Texas Attorney General Ken Paxton and his wife, state Sen. Angela Paxton, have finalized their divorce, one of his attorneys confirmed Thursday. The announcement follows a difficult election for the outgoing Republican attorney general, who lost his bid for the U.S. Senate nearly a week earlier.

Angela Paxton sought to end their 38-year marriage after her husband began his Senate campaign. In filing for divorce, she cited allegations of adultery and described her decision on social media as being based on “biblical grounds.” She had previously remained alongside him during a decade of legal troubles.

Jared Julian, an attorney representing Ken Paxton, said the divorce terms would be kept private. He described the pair as showing mutual respect and said both appeared ready to move into the next stages of their lives. An attorney for Angela Paxton did not immediately answer telephone and email messages Thursday. The New York Times first reported that the divorce had been finalized.

The development came after Democrat James Talarico defeated Paxton by a double-digit margin in one of the midterm elections’ most expensive races. The result was part of a wave of Democratic victories nationwide. At the start of the year, winning the Texas Senate contest had appeared to be a longshot for Democrats.

Paxton secured the Republican nomination by defeating longtime incumbent Sen. John Cornyn in the primary and subsequently had President Donald Trump’s endorsement. But he struggled to gain traction against Talarico in the general election, as the campaign became in part a judgment on his personal and political history.

Some Republicans had viewed Paxton’s candidacy as a possible strain on party resources because of the legal, ethical and personal questions surrounding him for years. His legal troubles included state and federal corruption investigations. An extramarital affair also became public during his state impeachment trial in 2023.

In October, with less than a month remaining before the election, Angela Paxton appeared in a campaign advertisement encouraging support for the Republican ticket. She did not name her estranged husband, instead emphasizing the importance of helping the party’s entire team reach the finish line rather than focusing on individual candidates.

Paxton will also be leaving the attorney general’s office. Democrat Nathan Johnson won the election to succeed him and is scheduled to take office in January.