A police officer was removed from a firearms unit after setting off his weapon in a police building.
The weapon, believed to be a Heckler and Koch G36 rifle, was discharged at Fettes Police Station, but no one was injured in the incident.
According to reports in the Scottish Sun, one officer was thought to have been nearby when the gun went off in the secured armoury.
It has been confirned that the officer will face re-training following the incident and has been taken off active duty.
The incident has also been referred to the Police Investigations and Review Commissioner, although it is thought that no action will be taken by the watchdog.
The bullet discharged from the standard police weapon smashed into a wall but there were no injuries.
A report said the officer had been “negligent” and that the incident was preventable.
A Police Scotland spokesman said: “Following an accidental discharge of a firearm within the armoury area of Fettes Police Station on Sunday January 28, a referral was made to PIRC.
“No one was injured during this incident.
“It would be inappropriate to comment further at this time.”