After 17 years of marriage and two official separations dating as far back as 2008, David Duchovny and Téa Leoni have divorced.

People reports that Duchovny, 54, and Leoni, 48, filed divorce papers in June, saying their marriage had "irretrievably" broken down.

Leoni, who returns to TV this fall in CBS' Madame Secretary, will have primary custody of their son, Kyd Miller, 12, and daughter, Madelaine West, 15, though she will share legal custody with Duchovny. Both parents live in Manhattan.

The Californication star will pay $48,000 per month in child support and alimony, in addition to footing the bill for school and college tuition.

The couple met through a pre-interview dinner organized by The Tonight Show With Jay Lenoand married in 1997. They separated and reconciled in 2008 when Duchovny was treated for sex addiction. They later separated again in 2011.