Tea Leoni and David Duchovny have signed the papers to finalize their divorce. The couple first separated in 2008 while the actor sought help for sex addiction. They had an on/off relationship for the past several years and reportedly tried to save their marriage.

Then in June Duchovny filed for divorce, citing an irretrievable breakdown of the relationship. The split was made official after a settlement was reached, according to TMZ.com.

Leoni reportedly was granted primary physical custody of their two children, aged 15 and 12, but the stars share joint legal custody. Duchovny is believed to be paying just over $8,000 a month in child support, plus approximately $40,000 in spousal support.

The couple married in 1997. Leoni is starring in the upcoming TV drama "Madame Secretary," which will airs on CBS this fall.

Duchovny recently wrapped up the final season of "Californication." He stars in the upcoming CBS drama "Aquarius."