A solicitor who embezzled more than £21,000 from the firm where he worked has been spared a prison sentence after selling his home in order to repay the money.

Paul O'Donnell (35) had been told he faced jail for taking a total of £21,485 from Edinburgh practice Thorley Stephenson between 1 November 2012 and 1 September 2014. But Sheriff Frank Crowe at Edinburgh Sheriff Court, who had deferred sentence with the message "I would like to see repayment. The firm will have to repay their clients and regain their reputation", yesterday imposed instead a six month restriction of liberty order.

The order means O'Donnell is confined to his house from 9pm to 6am for six months.

For O'Donnell it was said that he had been declared bankrupt and no longer practised as a solicitor. His wife was standing by him and he was living with relatives after selling his house in Glasgow.

The court had heard that following complaints from 11 clients, it was found that payments ranging from £750 to £1,800 had not been lodged with the firm's cashier. O'Donnell later admitted to having had financial difficulties.

Sheriff Crowe told O'Donnell that cases like this, involving professional people, usually involved a sentence of imprisonment, but he took into account that O'Donnell had fully cooperated, had now made full repayment, and had lost his career.