Rapper 50 Cent has been ordered to stay clean of drugs and take an anger management course to avoid spending time in jail.
The rapper faces randum drugs testing
The US star was charged with assaulting three women at a concert last year after leaping into the crowd.
A judge in Springfield, Massachusetts, said if the rapper - real name Curtis Jackson - adhered to the conditions, the charges would be dropped.
Two women alleged he trampled on them while a third said she was punched.
50 Cent attended the hearing but managed to avoid waiting fans and photographers by slipping out of a side door after his case had been heard.
Other conditions imposed on the singer include making an educational anti-violence video and random drug testing for two years.
He must also pay out-of-pocket medical expenses to his three alleged victims and must not carry a gun in Massachusetts.
If he fails to keep to the conditions, he could face a spell in jail.
The incident happened in May 2004 when 50 Cent was a surprise guest at a concert in Springfield.
During a performance he had water thrown at him by an audience member, causing the rapper to launch himself into the crowd.
He and his bodyguards were then pushed back on to the stage by the club's security.