Fox News host, Bill O’Reilly lost custody of his two teenage children amidst a court battle with his ex-wife Maureen McPhilmy.

Nassau County Supreme Court made the initial ruling in 2015 and O’Reilly (67) had appealed but the decision was upheld last year. Maureen McPhilmy (50) now has full custody of the teenager, Madeleine (17) and her 13-year-old brother, Spencer.

The New York Appeals court decision, a 1,400-page document, states:

"Viewing the totality of the circumstances, there is a sound and substantial basis for the Supreme Court's determination that it is in the best interests of the children for the mother to be awarded primary residential custody."

The ruling also suggests that the court was influenced by the children’s choice, indicating they didn't want to live with O’Reilly.

It reads: “Particularly relevant in this case are the clearly stated preferences of the children, especially considering their age and maturity, and the quality of the home environment provided by the mother."

Bill O’Reilly loses custody battle with ex-wife, has to be more fair and balanced with kids https://t.co/eSMPQpoGrS pic.twitter.com/FyXgZATniE

— New York Daily News (@NYDailyNews) February 29, 2016

The Fox pundit will maintain visitation rights and share legal custody of the children. The case’s ruling, listed as “Anonymous 2011-1 v Anonymous 2011-2,” states “the record supports the court's finding that if either parent were awarded sole decision-making authority, there would be a danger that it would be used to exclude the other parent from meaningful participation in the children's lives.”

In 2015 the O'Reilly and McPhilmy's daughter, Madeleine, told a court-appointed forensic examiner that she saw her father dragging McPhilmy down a staircase by her neck at the couple’s home in Manhasset, New York.

O’Reilly released a statement denying the accusations. It read: “All allegations against me in these circumstances are 100 percent false. I am going to respect the court-mandated confidentiality put in place to protect my children and will not comment any further.”

Gawker published the transcripts from the court case in May 2015 which stated: “M. [Madeleine] reported—having seeing an incident where I believe she said her dad was choking her mom or had his hands around her neck and dragged her down some stairs.”

Read more: It’s time for Bill O’Reilly to renounce his Irish heritage (VIDEO)

O’Reilly and McPhilmy separated in April 2010. Since their separation, McPhilmy has married a Nassau County Police detective named Jeffrey Gross. According to the Daily Mail, when O’Reilly learned of their relationship he had an internal affairs investigation launched into Gross.

O’Reilly had previously raised money for the department. He told the church that McPhilmy was receiving communion even though he was divorced and remarried and that she had been telling their children that her second marriage was valid in the eyes of God. She was allegedly reprimanded by her Long Island parish in writing.

Bill O'Reilly and Maureen McPhilmy divorced in September 2011.

As part of the couple’s agreement, they hired a child therapist to arbitrate any potential custodial disputes. In the court papers from January 2013, McPhilmy claimed that O’Reilly had “hired the children's therapist as a full-time employee to perform virtually all of his parental duties.”

*Originally published in March 2016.