The deal – which is expected to be given a judge's backing today - means that a drawn-out court battle will be avoided next month.
‘The case has been settled,’ says K-Fed's lawyer Mark Vincent Kaplan. ‘The court still has to approve it. As of this evening there is a fully executed deal memo...
'All the issues that would have been addressed at trial have been settled. Can't speak to the exact terms of the deal. Orders in place...will stay in place.’
Britney, 26, will still have visitation rights – and though Kevin, 30, is 'absolutely delighted' with the agreement, it was an unexpected development, says Mr Kaplan.
‘Kevin was not [out] to get custody,’ he tells E! Online. ‘Kevin’s goal was to set up some kind of template so the mother of his children can co-parent.
‘Nobody could have anticipated the terms of events that have occurred....'
Britney had to hand over sons Sean Preston, 2, and Jayden James, 1, in January after being hospitalised.
Her dad Jamie, 55, is currently co-conservator of her estate and well-being.