People.com: Britney Spears and Kevin Federline reached a divorce settlement Thursday, PEOPLE has learned.
"The parties signed a global settlement on all issues of their marriage and the custody of the children," Michael Sands, a spokesman for Federline's attorney Mark Vincent Kaplan, tells PEOPLE.
The deal was worked out in five-hour meeting in the Los Angeles high-rise offices of Spears's attorney. At the table were Spears and Federline, along with Spears's lawyer Laura Wasser and Federline's counsel Kaplan and Jim Simon. During a smoking break downstairs, Spears met with Federline for 15 minutes.
The terms were not revealed. A judge will still have to sign off on the agreement. The deal comes just days after Spears left rehab on March 20.
Spears and Federline wed in September 2004 in a surprise ceremony and soon settled into a Malibu mansion. The couple had two sons, Sean Preston in September 2005 and Jayden James almost a exactly a year later. Not long after their second son was born, trouble signs appeared in their marriage, with Spears missing many of Federline's promotional appearances for his poorly received hip-hop album Playing With Fire. Spears filed for divorce on Nov. 7, 2006, citing irreconcilable differences.
In a temporary agreement, Spears had custody of the boys with three days of visitation for Federline. Britney began months of hard-partying in New York, Miami, Las Vegas and Los Angeles, hooking up for a time with Paris Hilton. Spears initially defended her partying as long-overdue fun, but by January, her manager acknowledged she was having a rocky moment. After a wild weekend in which she shaved her head, Spears entered rehab at Promises in Malibu, where she stayed for about four weeks. Federline, who watched the boys during her treatment, declined to return custody to Spears until he was satisfied with her follow-through to rehab, a source says.
Sources say that under the terms, K-Fed will walk away with around $1 million. As for their two kids, we're told Britney and Kevin will have joint custody, sharing physical custody 50/50. The divorce will be final, with a judge's signature, very soon.
In the past, when Laura Wasser, Britney's lawyer, has settled a high-profile divorce, the parties file a "skeletal judgment," which mean the specific terms will be omitted from the public documents.
The terms of the settlement remain under wraps, but sources close to the situation told E! that a TMZ.com report stating Federline walked away with $1 million and joint physical custody of the kids is not accurate.