Britain's spy agency stopped Harry Potter spoilers from leaking to the internet in the lead-up to a book release, its publisher has told ABC Radio.

Nigel Newton, the co-founder of publishing house Bloomsbury, has revealed the extraordinary measures taken to keep top-secret details about the boy wizard offline until each book hit shelves - including the involvement of the Government Communications Headquarters (GCHQ).

Newton printed Harry Potter and the Philosopher's Stone – the first book in J.K. Rowling's acclaimed series about a boy wizard – in July 1997.

ALESSIA PIERDOMENICO British author J.K. Rowling poses with a copy of her new book "Harry Potter and the Deathly Hallows" at the Natural History Museum in London July 20, 2007. REUTERS/Alessia Pierdomenico (BRITAIN)

By Christmas, it had sold 30,000 copies, and soon it was a worldwide phenomena. Speaking to Richard Fidler for ABC interview program Conversations, Newton said he had never seen readers respond to a series like they did to Harry Potter, and security was amped up accordingly.

READ MORE:

* JK Rowling announces eighth Harry Potter book

* Your Harry Potter books might be worth more than you think

* Wizarding world opens to Muggles

MARK BLINCH/REUTERS Each book's release revived Harry Potter fever among fans.

"It was completely mad and we were at the eye of the storm," Newton said.

"I remember Jo Rowling phoning me once after she'd delivered a new book, saying 'please Nigel will you release the name of the title, because I have people outside searching my trash can looking for bits of paper'.

"At about that time we had to go into a complete security lockdown because people were trying to steal the manuscript."

In one case, a journalist for The Sun was sent to the printing factory with £5000 (NZ$10,370) in a case, to offer to any worker who would "go in and nick a copy".

"The enemies – that is to say when people were trying to bust the plot – stood to ruin a great deal of pleasure for the world," Newton said.

A "genuine desire to know what happened next" drove the mania surrounding the books, particularly in the month before the later books in the series came out, when there was a "fever pitch of anticipation".

By the fifth book in the series, German Shepherds and Alsatians were patrolling the printing works at the suggestion of Newton's father, an ex-military man who had experience protecting arms depots.

Although one security guard managed to steal a damaged copy of the book, from a cage of damaged copies he was paid to protect, Newton and Bloomsbury "fortunately had many allies".

"I remember the British spy eavesdropping station GCHQ rang me up and said 'we've detected an early copy of this book on the internet'," Newton said.

"I got them to read a page to our editor and she said, 'Nah, that's a fake'. They're good guys."

From then on, interactions surrounding the series became very cloak and dagger. When it was time to pick up the manuscript of the latest book, Newton was phoned to meet at a pub for a beer – the same place the last manuscript was exchanged – and knew immediately what was about to happen.

He arrived, casually had a beer and a chat, and didn't mention the manuscript, which was sitting in a grocery bag on the floor.

"As I left the pub, I simply picked up the bag that he walked in with, saying nothing about it ... and drove it home fearfully," Newton told Fidler.

Newton didn't even tell his family the manuscript was in the house. He read it in one night, then drove it to the house of the book's editor Emma Matthewson, whose security had been bolstered with burglar alarms and whose computer wasn't connected to the internet.

Fidler's interview seems to be the first time Newton has mentioned GCHQ had a role in Harry Potter's success.

When a comment on the situation was sought from the spy organisation, GCHQ offered the kind of wry reply that would make any Harry Potter fan smirk.

"We do not comment on our defence against the dark arts," a spokesman told British media.