A sheriff has stepped down after allegations were made about his personal life, it has been confirmed.
Andrew Lothian, 66, who was based at Edinburgh Sheriff Court, took the decision to retire on Friday.
The allegations about him were printed in a Sunday newspaper. Sheriff Lothian's departure was confirmed by the Scottish Court Service.
Sheriffs normally retire at the age of 70, meaning Sheriff Lothian has gone four years early.
He will not hear any more cases on the capital's bench.
A spokeswoman for the Scottish Court Service said: "I can confirm that Andrew Lothian decided to retire with immediate effect following allegations about his private life."
The sheriff has presided over a number of high profile cases in the capital.
Earlier this year he jailed an ambulance worker who pointed his camera phone at a woman patient's private parts as she lay half-naked in the back of his ambulance.
He also ruled last year that the NHS 24 system for dealing with calls was to blame for the delay in emergency treatment given to toddler Kyle Brown who died from meningitis in April 2006.