A 48-year-old woman was shot by officers and arrested at Craigmillar Castle on Saturday afternoon and was not seriously injured during the incident.
The alarm was raised in a wooded area of the castle grounds. Negotiators and officers with firearms responded and the area was sealed off.
The woman was shot with a rubber bullet, known as a baton round.
The incident is now being investigated by the Police Investigations and Review Commissioner (Pirc).
A Pirc spokesman said: “We are investigating an incident involving a 48-year-old woman within the grounds of Craigmillar Castle where a baton round was fired by an officer.
“The woman received an injury which did not require hospital treatment and was subsequently arrested by police.
“The incident was referred to the Pirc by Police Scotland and a report on the commissioner’s findings will be submitted to the deputy chief constable in due course.”