A drug-addicted doctor whose wife fell seriously ill after he injected her with heroin has been ordered to perform 300 hours of community service.
Ashley Sibery, 39, will also be supervised for two years.
He admitted culpable and reckless conduct at the couple's home in London Street, Edinburgh, on 2 April.
Edinburgh Sheriff Court heard that he had completed treatment for his addiction and that his wife, Sital, and colleagues were sticking by him.
The court was earlier told that on the day of the offence, Mrs Sibery had confronted her husband over his erratic behaviour.
He admitted that he had been using heroin for two months.
Mrs Sibery threatened to end the marriage if he did not tackle his addiction.
However, despite that ultimatum, Sibery persuaded his wife to take what was supposed to be his final fix.
The court heard how Sibery wanted his wife to experience the feeling he got when he took heroin.
However, Mrs Sibery collapsed and started having difficulties breathing.
On Tuesday, Sheriff Elizabeth Jarvie QC heard that Sibery, who is currently suspended from practising medicine, had successfully completed treatment for his addiction.
The sheriff said: "I am persuaded that in these particular circumstances, the imposition of a non-custodial sentence is correct and in the public interest.
"I will impose a community payback order on you which will last for two years. You will also be placed on supervision and you will perform 300 hours community service.
"I hope that this sentence will allow you to utilise your talents within the community."
Sibery will also have to appear in court again in November 2013 in order for his progress to be monitored.