Lil Za, who was arrested on suspicion of drug possession while cops were searching his friend Justin Bieber's house in mid-January, will get away with three years' probation after pleading no contest Wednesday to one felony count of possession of a controlled substance.

The aspiring rapper, real name Xavier Domonique Smith, also pleaded no contest to a misdemeanor count of damaging a prison or jail, which had originally been a felony charge when he picked it up for beating up a jailhouse phone before he was bailed out.

CaptionVanilla Ice

Palm Beach County Sheriff's Office / Associated Press

Vanilla Ice, real name Robert Van Winkle, was arrested in February 2014 in Florida on suspicion of felony burglary and grand theft. The rapper-turned-DIY Network personality, who allegedly took items from an abandoned home near one he was renovating for his TV show, cut a plea deal for community service, restitution and a clean record if he behaves for nine months.

Vanilla Ice, real name Robert Van Winkle, was arrested in February 2014 in Florida on suspicion of felony burglary and grand theft. The rapper-turned-DIY Network personality, who allegedly took items from an abandoned home near one he was renovating for his TV show, cut a plea deal for community service, restitution and a clean record if he behaves for nine months.

In addition to probation, Za was ordered to do 20 days of Caltrans or similar community labor, pay a $1,000 fine and $600 in restitution, and enter a drug program, the Los Angeles County District Attorney's Office said.

He was represented by Shawn Chapman Holley, the high-profile attorney who worked wonders for Lindsay Lohan.

In late January, Za was charged with two felony counts of drug possession -- Ecstasy and oxycodone -- and could have faced up to nine years in jail, according to TMZ.

Once the community labor and drug program are done, the felony will be cut to a misdemeanor, the website said. Za called himself Bieber's personal assistant and bragged to deputies that he kept the Ecstasy around because girls "love it," according to legal documents obtained by TMZ.

A sheriff's department spokesman said in January that the drugs found near Za were found in "plain view" by deputies searching Bieber's Calabasas mansion for evidence after a neighbor accused him of vandalism. Yep, the egging situation.

The Biebs has since sold the house to Kourtney Kardashian, who was looking for new digs after splitting up with Lamar Odom.

Things have gone from bad to worse for Lil Za, a Justin Bieber BFF who was arrested Tuesday morning on suspicion of felony drug possession: While in custody, he allegedly vandalized a phone in the jailhouse, so now he is facing a felony charge related to that as well.

How much trouble is Justin Bieber in this time around? The pop singer was served with a search warrant Tuesday morning at his Calabasas mansion and detained, along with seven others in his house, while about a dozen law enforcement officers did their thing.