DMX is a free man—sort of. According to TMZ, a Manhattan judge has just agreed to let the troubled rapper off of his house arrest as long as he checks into a drug rehab program.

If you recall, X's lawyer Murray Richman recently sent the judge a letter requesting permission for X to leave his home in order to perform some shows throughout the rest of August and September. X was originally arrested for 14 counts of tax evasion last month, and was put on house arrest after failing four drug tests.

Now, X will be able to leave his house without his ankle monitor, just as long as he puts himself in an inpatient program to deal with his drug abuse, which his lawyer says had become "impossible to manage." X will still have to secure permission to leave New York, but he can go to his rehab facility without any issues.

This revelation comes just a few days after a judge gave X permission to excuse himself from his house arrest in order to perform one show. For that arrangement, X was required to be accompanied by a sober coach. Although X had to pay for the expenses himself, his lawyer was happy with the outcome.

“We’re ecstatic about the court’s decision giving Mr. Simmons the opportunity to perform and continue his career,” Richman said at the time.

Here's to hoping X can get the help he needs.

See 40 Hip-Hop Albums Turning 20 in 2017

More From XXL