Minnesota U.S. Rep. Ilhan Omar officially ended her marriage to husband Ahmed Hirsi on Tuesday, scarcely a month after she petitioned for a divorce citing an “irretrievable breakdown” in their marriage.

The Minneapolis Democrat filed for divorce from Hirsi in early October, about a month after a Washington, D.C., physician alleged that her husband left her after becoming romantically involved with Omar, a client of his political consulting business. Both Omar and the consultant, Tim Mynett, have denied an affair.

An uncontested agreement signed Tuesday by Hennepin County Court officials awards Omar and Hirsi joint legal and physical custody of their three children, ages, 16, 13 and 7.

The settlement ends a painful personal episode that has brought unwanted political and media attention to the freshman Democrat’s life outside of her legislative work, a saga that has played out in tabloids from London to Los Angeles and which her lawyers have said took “a significant toll” on the family.

It also comes as her national profile has risen as a frequent political target of President Donald Trump and House Republicans who have sought to make her and her “squad” of outspoken women of color in Congress the face of the Democratic Party.

Omar’s attorney Jaime Driggs issued a statement on her behalf: “Anyone going through a divorce is glad when it is over and this case is no exception. Ilhan is grateful that she and Ahmed were able to come to a resolution for the sake of their children. Like any other family in this situation, Ilhan wishes for privacy and will not be commenting any further.”

An attorney for Hirsi said he has no comment.

Omar and Hirsi had been romantically involved since she was a teenager in the early 2000s, though they did not legally marry until 2018.

Omar was also previously married to another man named Ahmed Nur Said Elmi during what she has described as an impasse in her relationship with Hirsi. That marriage legally ended in 2017, several years after she reunited and had a third child with Hirsi.

Her marital history came under political fire earlier this year after it came to light that she and Hirsi filed taxes jointly while she was still legally married to Elmi, a violation that she corrected but never explained. That in turn raised questions about whether her marriage to Elmi was a real marital union or an effort to help Elmi’s immigration status. Conservative opinion journalists propagated a case based on social media posts suggesting that Elmi is her brother. She has denied Elmi is her brother but declined to answer detailed questions about the circumstances of their brief marriage.

Some of the attacks she has sustained as a congresswoman and former state representative have stemmed at least in part from her status as a naturalized citizen and refugee from Somalia.

Omar’s married life also has crossed over continents and cultures.

She has said she first married Hirsi in Minnesota in their “faith tradition” in 2002. She was 19. They split in 2008 with two children but without having been legally married. A year later, she was legally married to Elmi, a British national living in the Twin Cities. She said she and Elmi ended their marriage in their faith tradition in 2011, though they did not legally divorce until 2017. Meanwhile, she and Hirsi reconciled in 2012 and had a third child together.

The Minnesota Campaign Finance and Public Disclosure Board fined Omar earlier this year for using campaign funds to hire a lawyer to amend joint tax returns she had filed with Hirsi in 2014 and 2015 when she was still legally married to Elmi.

She and Hirsi did not legally marry until January 2018, the same year she was elected to Congress.