Rap and legendary producer, Dr. Dre has struck a temporary agreement in his legal battle with estranged wife Nicole Young.

The music mogul has agreed to a temporary spousal support payment of $2 million on Thursday, according to multiple reports.

TMZ reports that Dre will continue to cover Nicole’s living expenses at her Malibu home, as well as her mother’s Pacific Palisades house for the next several months. However, thanks to a judge’s ruling in October, he will not be responsible for covering $5 million in legal fees or the hiring of a new personal security detail.

The agreement comes just days after the 55-year-old music mogul was rushed to the hospital after suffering a brain aneurysm on Monday, according to multiple reports.

Dre took to Instagram on Tuesday night to assure fans he’s “doing great” and will be out of the hospital soon.

“Thanks to my family, friends and fans for their interest and well wishes,” he wrote. “I’m doing great and getting excellent care from my medical team. I will be out of the hospital and back home soon. Shout out to all the great medical professionals at Cedars. One Love!!”

The following day, the rap legend was targeted in a potential attempted burglary, as trespassers were apprehended near his home while he remained hospitalized.

Nicole filed for divorce from Dre on June 29, after 24 years of marriage, citing irreconcilable differences. The estranged couple shares two adult children, son Truice and daughter Truly.