WENN

Grey's Anatomy star Jesse Williams has finalized his divorce after a bitter three-year battle with his ex.

According to legal documents, obtained by TMZ, the actor and his former wife, Aryn Drake-Lee, will share joint legal and physical custody of their two kids Maceo and Sadie, and she gets to keep the former family home in Los Angeles, as well as pads in Brooklyn, New York and Oakland, California.

Aryn is also keeping a leased 2017 Audi Q7 SUV and 2018 Q5 SUV, while her ex gets the keys to his leased 2018 Porsche Cayenne SUV.

A big plus for Jesse – he will retain all the profits from his Grey's Anatomy run since the couple split in 2017.

All accounts and royalties accumulated during the marriage will be split up, and Williams has agreed to cover child support costs and pay spousal support to the tune of $100,000 .

Jesse and Aryn, who were married for five years, still have to work out some rules about posting images of their kids on social media.

Reports suggest the former couple agreed on all terms last year, but a judge has just signed off on the divorce.