David Duchovny and Tea Leoni are officially ending their 17-year marriage for good as they have reportedly got divorced three years after splitting up. The former 'X-Files' actor took the first steps to end their nuptials back in June when he secretly filed the legal papers.

David Duchovny
Ducnhovny and Leoni tied the knot in 1997

Duchovny and Leoni, who tied the knot back in 1997, are "citing an irretrievable breakdown of the relationship," as the reason of their separation, according to TMZ. However, they have already settled everything themselves and will share joint legal custody of their two children, son Kyd Miller, 12, and Madelaine West, 15.

More: David Duchovny Refused To Let Gillian Anderson Appear On 'Californication'

Leoni will have primary custody, with Duchovny paying $40,000 in spousal support to the 48 year-old actress, as well as $8,333 in child support, the gossip site also reported. Adding that the 'Evolution' actor will also cover the costs of schooling, college and other costs.

The duo briefly parted ways in 2008 while the 54 year-old actor entered rehab to seek treatment for sex addiction. They reconciled shortly after, and then split for a second time three years later in 2011.

More: Is A Third 'X-Files' Movie Really Such A Good Idea?

This was Duchovny's first marriage, but Leoni's second as she first tied the knot back in 1991.