MINNEAPOLIS — Democratic Rep. Keith Ellison survived an ex-girlfriend's abuse claim to become Minnesota's next attorney general after the allegation put the office in play for the GOP for the first time in half a century.

Ellison defeated Republican Doug Wardlow, who was a virtual unknown and would have been a heavy underdog but for the abuse claim against Ellison, which he strongly denied.

He rose to national prominence as the first Muslim elected to Congress and serves as deputy chairman of the Democratic National Committee. He talked of using the attorney general's office to resist President Donald Trump's agenda.

Then his ex-girlfriend, Karen Monahan, accused him of dragging her off a bed during an argument in 2016. Monahan claimed to have a video, but never produced it. An investigation commissioned by Minnesota Democrats ruled the accusation was "unsubstantiated."

Wardlow, and Republicans, called the investigation a whitewash, and hammered Ellison with the allegations throughout the campaign.

"This was the challenge of a lifetime," Ellison said of his win.

"I don't have anything to add," he said when asked about the allegations. "I just want to be the best Minnesota attorney general I can possibly be. That's all I want to do."

The seat opened abruptly in June when incumbent Lori Swanson launched a late bid for governor. Soon after Ellison declared and shortly before the primary, Monahan's claim surfaced.

Though Ellison survived a crowded primary, the accusation dogged him, and other Democrats who refused to disavow him, throughout the campaign.

Suddenly the virtually unknown Wardlow — who was a lawyer for a conservative Christian legal advocacy group — became a realistic contender. A Star Tribune/Minnesota Public Radio poll last month gave Wardlow a slight lead. The last GOP attorney general, Doug Head, served one term before losing the 1970 gubernatorial race to Democrat Wendell Anderson.

Ellison has been a national political figure since 2006, when, after serving two terms as a state representative, he became the first Muslim elected to Congress. A leader in the Bernie Sanders wing of the Democratic Party, Ellison deputy chairman of the DNC last year.

Paul Taklo, 48, a designer in Minnetonka, said he voted for Wardlow. Taklo described himself as a conservative with libertarian beliefs who generally votes Republican.

"I just don't care for Ellison," Taklo said. "It's the liberal aspect of him."

David Galle, 49, a lawyer in Minneapolis, backed Ellison in early voting Monday, calling him a strong supporter of Minneapolis and the state.

"Was I disheartened with some of the, you know, coverage? Yes, it certainly is messy, but as far as his approach to Minnesota versus his challenger, he was for me the clear choice," Galle said.

During Wardlow's single term in the Minnesota House, he backed so-called right-to-work legislation to block unions from collecting mandatory dues. He also tried unsuccessfully to stop the state from setting up the MNsure health insurance exchange.

After losing in 2012, he joined the Alliance Defending Freedom, leading its unsuccessful fight in a U.S. Supreme Court case that legalized same-sex marriage in 2015. He also litigated against letting transgender students use bathrooms of their choice and defended a Michigan funeral home that fired a transgender employee.

Ellison vowed to use the attorney general's office to fight Trump on immigration and other issues. While Wardlow presented himself as an apolitical alternative, he was recorded as saying at a private event that he wanted to fire 42 Democratic attorneys and replace them with Republicans. He said he misspoke.