U.S. Rep. Keith Ellison (D-Minn.) in 2017. (Melina Mara/The Washington Post)

A Minnesota County Court unsealed divorce records of Rep. Keith Ellison, the Democratic candidate for Minnesota attorney general, and his ex-wife Kim on Wednesday, ending a legal battle between the former couple and two media outlets.

The Minneapolis Star Tribune and conservative website Alpha News petitioned the Hennepin County Family Court for the divorce records after Karen Monahan, the congressman’s former girlfriend, accused him of physical abuse. Ellison, who is also deputy chairman of the Democratic National Committee, has denied the allegations.

The Ellisons, who divorced in 2012, both unsuccessfully opposed unsealing the documents, citing privacy concerns.

The documents, which were obtained by the Star Tribune, contained no allegation that Keith Ellison abused his ex-wife. They did, however, contain a 2015 statement in which he reported that his ex-wife had hit him throughout their 25-year marriage. The affidavit, written in response to a motion for increased spousal maintenance, said that “it was very humiliating to admit that I was a domestic abuse victim."

The former couple has presented a united front.

“There was never any abuse in our marriage and there’s nothing in our files to say that there was,” Kim Ellison said at a news conference Tuesday. She explained that the court documents include her medical and health records, which detail her years-long battle with depression. Her ex-husband, whom she has known since she was a teenager, was arguing to keep them private on her behalf, she said.

“I’m ashamed that a judge thinks it’s okay to exploit somebody’s mental illness,” said Kim Ellison. “And it’s unconscionable to me that Alpha News and the Star Tribune want to use it to influence the results of an election.”

The documents had been sealed since the divorce was finalized in 2012, but the news outlets claimed disclosing them was a matter of public interest.

In a statement released Wednesday, Keith Ellison said: “I am extremely disappointed that the court has gone back on its agreement to seal [Kim’s] and my divorce file, agreeing to open it at the request of a far-right propaganda outlet with a history of racism and religious bigotry, Alpha News, and the Star Tribune.

“I understand perhaps better than most that as a public official, my personal life falls under higher scrutiny than others. But to pry into the details of a sealed divorce file that the court previously ordered closed, on the eve of an election, is shameful and outrageous.”

Read more:

Trump seems eager to contain, not confront, fallout from journalist’s disappearance

Let’s quickly note how bad Trump’s current climate-change argument is

Joe Biden, 75, doesn’t mind if you think he’s too old to take on Trump, a fellow septuagenarian

Trump says it’s not his fault if Republicans lose the House