Jennifer Lopez and Marc Anthony’s divorce finalized

Jennifer Lopez and Marc Anthony have finalized their divorce, three years after their headline-grabbing split.

The stars parted ways in 2011 after seven years of marriage, and Anthony moved to make their separation official by filing legal papers in April, 2012.

The union was officially declared over on Monday, when a Los Angeles judge signed off on their divorce and custody agreement.

Lopez was given primary custody of their 6-year-old twins Max and Emme, while Anthony will spend seven days a month with the kids. They will share joint legal custody.

However, there were strict rules about the children’s care – their nannies must accompany Max and Emme when they stay with their dad, and both stars must use their “best efforts” to keep the youngsters out of the public eye and shield them from “aggressive news organizations and photographers,” reports TMZ.com.

The former couple also agreed there was no need for spousal or child support. Anthony had previously handed over $18,000-a-month for their twins.

The amicable settlement is good news for Anthony, who was last week ordered to increase his child support payments to his second ex-wife, Dayanara Torres, to $26,000-a-month for the ongoing care of their two sons.

Meanwhile, the divorce will give Lopez a fresh start following her recent break-up from her dancer boyfriend Casper Smart