Officers recovered a number of items after searching a property in Jamaica Mews in the New Town area of Edinburgh on Wednesday.
Police said two small controlled explosions were conducted on Wednesday night at its Fettes headquarters and one yesterday morning “for safety reasons”. Mews residents had been evacuated at around 1pm and were not allowed back into their properties until around midnight.
Officers sealed off the street while they carried out a search of a house.
Police Scotland said a 38-year-old man had been arrested and charged with firearms offences.
The force added there was no danger to the public at any time.
A spokesman for Police Scotland said: “Following officers searching a property in Jamaica Mews under a firearms warrant, a number of items were recovered and for safety reasons there were two small controlled explosions at Fettes late on Wednesday night and a further one on Thursday morning.
“At no time was there any danger to the public.”
He added: “As a precaution to ensure their safety, a small number of residents in the area around Jamaica Mews were evacuated while the search operation was ongoing.
“A 38-year-old man has been arrested and charged with firearms offences and is appearing at Edinburgh Sheriff Court.”
Last November, a Leith bar was evacuated and a section of road cordoned off as army bomb disposal experts carried out a controlled explosion on what turned out to be an envelope containing paper.
Police were called to the Leith Beer Company at the Shore after reports of a suspicious package.
After a large area was evacuated, police later said the package contained only paper.