Two men have been charged with weapons offences after they were thought to be trying to sell a stolen copy of the new Harry Potter novel to a newspaper.
Armed police surrounded a house after shots were heard
Police were called to Tresham Street in Kettering, Northants, on Friday morning after reports a weapon had been fired.
They said a person "in possession of firearms" had tried to sell a copy of the Potter book, due out next month. The pair have been released on bail.
The Sun newspaper said it had intended to obtain the book and inform police.
The two men, aged 37 and 19, have been released on police bail until they appear before magistrates in the county next week.
A Northamptonshire Police spokesman said: "We have charged a 37-year-old Kettering man with possession of an offensive weapon and with handling stolen property and a 19-year-old with theft and possession of an imitation firearm with intent to cause fear of violence."
Harry Potter author, JK Rowling, was granted a High Court injunction against the two men.
A statement by legal firm Reynolds Porter Chamberlain on the author's behalf said: "This order was made following our client's discovery this morning that a copy of the forthcoming Harry Potter Book, Harry Potter And The Half Blood Prince, had been obtained by unauthorised persons who had subsequently offered the book to newspaper journalists."
Earlier, a Northamptonshire Police spokesman said surrounding streets had been closed as armed officers looked for the gun involved following the alleged incident.
"A firearms operation was launched at a residential address in Kettering town centre which resulted in two men being arrested on suspicion of theft and firearms offences," the spokesman said.
Two books were also recovered at the scene, he added.
A spokesman for The Sun said the paper had been approached by someone claiming to have a copy of JK Rowling's latest novel.
He said: "A reporter and photographer met with two men with the intention of obtaining the book so it could be returned to the publisher and the police could be informed."
A Sun reporter claimed one of the men held a gun to his head before firing a shot into the air.
Reporter John Askill said the man had been "shaking with rage" after he had refused to pay £50,000 for the book.
Harry Potter and the Half-Blood Prince, Rowling's sixth book, is due to be released on 16 July.
It has sparked huge interest because of Rowling's revelation that a major character would be killed off.
Bookmakers were forced to suspend betting on the victim's identity late last month amid fears that the manuscript had been leaked.
Suspicions were aroused because of a string of bets on the death of the Hogwarts head teacher, Professor Dumbledore.
The flurry of bets came from the town of Bungay in Suffolk, where it is thought the book is being printed.