Scotland international footballer Garry O'Connor has escaped a prison sentence for possession of cocaine and obstructing police.
O'Connor, 29, was instead ordered to carry out 200 hours of unpaid work when he was sentenced at Edinburgh Sheriff Court.
He was found guilty on June 1 of obstructing and hindering two officers on May 14 last year in Hope Street Lane North, Edinburgh and running away from them as they tried to establish his details. He was also found guilty of possessing class A drug cocaine on the same date.
Sentencing O'Connor, Sheriff Derrick McIntyre said the offences took place in the early hours and both could result in a custodial sentence of up to 12 months.
O'Connor, who played for Edinburgh club Hibernian last season, was caught with half an ounce of cocaine, worth about £460.
"Charge two involves a significant amount of class A drugs and I would be fully justified in sending you to prison. I would have thought that someone in your position, as a footballer in the public eye, would set a better example to young people including your own son, which you now seem to acknowledge," Sheriff McIntyre told him.
Sheriff McIntyre acknowledged that O'Connor, of East Lothian, was not involved in the supply of drugs and imposed a community payback order of 200 hours' unpaid work to be completed within six months.