DMX

*Whew! That was close.

DMX almost lost his New York home due to foreclosure. But he came through and paid $250,000 just in time, according to the JasmineBRAND.com.

It was just last year Compass Bank sued the rapper. The lawsuit detailed him and his wife Tashera Simmons taking out a $500K mortgage in 2004, but the couple has since defaulted on the loan.

Not only were they in default, but 1403 days in default, according to the bank. Back in May 2012, the bank wanted the full amount on the loan — $258,927.87.

But the Bank accused him of refusing to pay off the loan. Hence, Compass filed a lawsuit against the rapper — pushing for foreclosure on his family’s home.

Nevertheless, he finally paid off his Mount Kisco, NY home he bought back in 2000 for $649,000 and saved it from foreclosure.

Although the lawsuit stems from last year, Compass Bank failed at continuing the suit. This means DMX was able to pay $250K and save his home from being auctioned off.

Read the full court documents here.