CoolioRapper Coolio reached a plea deal in court on Friday (June 26) in connection with a March drug arrest at LAX airport, which would send him to rehab instead of jail.

According to the Associated Press, the 45-year-old rapper (real name: Artis Leon Ivey) pleaded guilty to felony cocaine possession in exchange for 18 months in rehab.

Coolio was arrested on March 6 at LAX International Airport, after airport authorities found crack cocaine during a search of his luggage. The rapper even grabbed a screener’s arm to prevent a search of his luggage, said reports.

As part of the plea deal, misdemeanor charges of battery and possession of a smoking device were dismissed.

After he completes his 18-month rehab stint, he can request that his case be dismissed.

He originally pleaded not guilty to the charges. He is now due in court September 28 for a report on his progress.