Harry Potter author J.K. Rowling's secret is out.

The writer published a new detective novel in April under the pen name Robert Galbraith -- a former policeman in the military -- and she had hoped to keep the author's real identity a secret, but Britain's Sunday Times did a little digging into the success of the unknown Galbraith -- whose novel "The Cuckoo's Calling" has been receiving rave reviews.

The Times found that the two writers have the same agent and that the new novel was written similarly to the final Potter novel, Harry Potter and the Deathly Hallows, so they put two-and-two together and called her out on it.

"I had hoped to keep this secret a little longer because being Robert Galbraith has been such a liberating experience," she told the paper. "It has been wonderful to publish without hype or expectation, and pure pleasure to get feedback under a different name."

Since it was revealed that Rowling actually wrote the novel it has gone from 5,076th place on Amazon.co.uk all the way to the number-one bestseller spot literally overnight. It also currently tops Amazon's sales rankings in the U.S.

Rowling released her first "adult" novel, "The Casual Vacancy," last year.