A British law firm apologized Wednesday to author J.K. Rowling for revealing that she posed as a man to write a crime novel.
The "Harry Potter" author was exposed by a newspaper on July 14 as the author of "The Cuckoo's Calling," a thriller ostensibly written by former soldier and first-time novelist Robert Galbraith.
The book was published in April to good reviews but modest sales, and there was speculation that Rowling or her publisher had leaked the news to raise the book's profile.
Latest: Do You Support Giving Illegals Citizenship? Vote Here Now
But the law firm Russells, which has done work for Rowling, acknowledged that one of its partners had let the information slip to his wife's best friend, who tweeted it to a Sunday Times columnist, The Associated Press reported.
Rowling sued the lawyer and the friend. Her attorney, Jenny Afia, told Britain's High Court on Wednesday that Rowling had been left "angry and distressed that her confidences had been betrayed."
"As a reflection of their regret for breach of the claimant's confidence, including frustrating the claimant's ability to continue to write anonymously under the name Robert Galbraith, the defendants are here today to apologize publicly to the claimant," Afia said.
Russells agreed to reimburse Rowling's legal costs and to make a "substantial" donation to The Soldiers' Charity, which helps former military personnel and their families.
Rowling also said she was donating all royalties from the book for the next three years to the charity.
The hero of her novel, Cormoran Strike, is a veteran who lost a leg in Afghanistan, and Rowling has said she drew on conversations with serving soldiers and veterans to create the character.
"This donation is being made to The Soldiers' Charity partly as a thank you to the army people who helped me with research, but also because writing a hero who is a veteran has given me an even greater appreciation and understanding of exactly how much this charity does for ex-servicemen and their families, and how much that support is needed," Rowling said in a statement.
Urgent: Should Obamacare be Repealed? Vote Here Now
The writer said she had always intended to give part of Galbraith's royalties to the organization, "but I had not anticipated him making the best-seller list a mere three months after publication — indeed, I had not counted on him ever being there!"
Since Rowling was outed as the author, "The Cuckoo's Calling" has topped best-seller lists in Britain and the United States.
JK Rowling, 'Harry Potter' Author, Posed as Man to Write Crime Novel
JK Rowling's First Adult Novel Will Be 'Blackly Comic'
'Harry Potter' Author Hit With Plagiarism Lawsuit
© 2014 Newsmax. All rights reserved.