Justin Bieber's pal Lil Za has avoided jail time after striking a plea deal with prosecutors in his felony drug and vandalism case.

The aspiring rapper was taken into police custody in January (14) following a raid on Bieber's Calabasas, California home, where he was allegedly found in possession of ecstasy and painkiller Oxycodone.

He was booked for a felony, and was arrested for a second time hours later for breaking a telephone at the Los Angeles County Sheriff's jail, where he was being held before posting bail. That incident was initially filed as a felony too, but authorities subsequently reduced it to a misdemeanour.

The case returned to court on Wednesday (30Apr14), when Za, real name Xavier Smith, pleaded no contest to both counts in exchange for three years probation, 20 hours of community service and the completion of an outpatient drug treatment programme.

If he stays out of trouble for the next year, the felony drug charge will be reduced to a misdemeanour.

Meanwhile, he was also ordered to pay $600 (£375) for the vandalism charge to cover the cost of the broken phone.

Bieber's house was targeted by cops as part of their ongoing investigation into an egging incident involving the pop superstar earlier this year (14). Officials have yet to decide what kind of action they plan to take against the singer, who no longer owns the home after selling it to Kim Kardashian's sister Khloe.