Kelsey and Camille Grammer have finally settled their custody case, it is reported.
The former couple finalised their divorce last February and the actor married new wife Kayte Walsh just two weeks later.
The pair have been embroiled in a bitter dispute over their two children; Mason Olivia, 10, and Jude, seven, for months.
But TMZ claims that according to legal documents they have obtained, the case has now been taken off the court calendar meaning they have come to an agreement.
The children will apparently continue to live with their mother in Los Angeles but Kelsey, who is based in New York, will maintain "meaningful contact" with them.
The couple, who were married for 14 years, had reached a temporary custody agreement last summer but this is now a permanent order.
The Frasier actor and the Real Housewives of Beverly Hills star are also said to be close to resolving the financial aspect of their divorce with Camille expected to receive a $50 million settlement.
Meanwhile Kelsey announced last month that he is expecting twins with his British wife Kayte who he married last February.
"I'm really looking forward to meeting these new arrivals," Kelsey told People magazine.
"Fatherhood's always different based upon the character that comes into your life. They arrive and tell you what you have to do."
The 32-year-old former air stewardess and Kelsey began dating shortly after he and Camille officially separated in summer 2010. This is his fourth marriage.
Kelsey has daughters Spencer Grammer, 28, and Greer Kandace Grammer, 20, from other relationships.
© Cover Media