A man who was shot at his Londonderry home days after pleading guilty to drugs offences has been given 100 hours community service.
Emmet Smith, 25, of Mimosa Court in Derry's Waterside admitted committing five drugs offences between September 2016 and February 2019.
He will also remain on probation for three years.
A judge said Smith, who now has mobility issues, contributed to "the vicious circle of drugs in this city".
In September, Smith admitted being concerned in supplying cocaine and cannabis and also possessing the same drugs.
He also pleaded guilty to having diazepam.
Londonderry Crown Court was previously told Smith was caught after police had seized phones from other suspected drug dealers in 2018.
Sentencing Smith on Monday, the judge said he was reluctantly imposing an Enhanced Combination Order, meaning Smith will be on probation for the maximum period of three years.
The judge warned if he breached any of the order's terms he would be brought back to court and, in all likelihood, sent straight to jail.
The court had previously been told Smith was shot in the living room of his home in the Waterside area of the city on 30 September, six days after pleading guilty to the drugs charges.
A defence barrister told an earlier court hearing "the shooting was linked to his drugs dealing" and as a result of the shooting the "defendant had ongoing mobility issues".