WASHINGTON - The Democratic National Committee's second in command resigned from his post Thursday after being elected as Minnesota's new attorney general.

Keith Ellison, a six-term lawmaker representing the Minneapolis-area in Congress, was the first Muslim elected to Congress and announced this summer he wouldn't seek re-election and instead run for attorney general. He faced a tight race for the state's attorney general but was able to fend off Republican Doug Wardlow despite abuse allegations by his ex-girlfriend.

He served as the DNC's deputy chairman for about a year. His resignation was announced Thursday by the organization's chair, Tom Perez. It's unclear who will replace Ellison.

"Keith's decision means Minnesotans will have a full-time champion fighting for affordable health care, a fair economy and opportunity for all," Perez said in the announcement. "His tireless service as deputy chair enabled us to make substantial progress in rebuilding our party and rebuilding trust with our grassroots."

Ellison, a former civil rights attorney, was lured into Minnesota’s attorney general race after incumbent Lori Swanson jumped into the governor’s race.

He said it was attorneys general who led the fight against President Trump’s ban on travelers from Muslim majority countries and he wanted to be part of that fight.

But the campaign was not without hurdles. Ellison, days before the primary election, was accused of abusing an ex-girlfriend