Singer Pete Doherty has been fined for five counts of possessing drugs, including crack cocaine and heroin.
Pete Doherty is receiving treatment for drug addiction
The 27-year-old, who has been having treatment for his addiction, appeared at Thames Magistrates Court in London.
The Babyshambles frontman was ordered to pay £770 and disqualified from driving for four months.
The singer who pleaded guilty at an earlier trial hugged fans outside the court. He told reporters he felt "relieved" about not going to jail.
District Judge Jane McIvor told Doherty that the offences were not serious enough to require a custodial sentence.
"He's not going to jail. It's amazing," said 16-year-old fan Georgina Raymond. "I hugged him," she added.
Doherty was arrested in April for possession of less than 2 grams each of heroin, cannabis and cocaine.
It happened just three hours after he was sentenced to two years of community service for previous drug offences.
In October he was fined £750 for assaulting BBC Radio 1 reporter Trudi Barber.