Rep. Keith Ellison (D-MN), a progressive stalwart of Congress, officially filed paperwork on Tuesday to run for attorney general in Minnesota.

Throughout Monday there were deliberations about the progressive congressman potentially leaving his seat and pursuing statewide office.

“Our pledge of allegiance promises an America with liberty and justice for all—no exceptions,” Ellison said in a statement. “But too often, Minnesota's working families and the most vulnerable among us are taken advantage of or are targets of discrimination. I am running to be the People's Lawyer to hold those in power accountable and to protect and defend all Minnesotans.”

He goes on to say that “No one—not even a president—is above the law. From immigration reform to protecting our air and water, it has never been more important to have a leader as Attorney General who can stand up against threats to our neighbors' health or freedoms.”

A unique shakeup in Minnesota politics led to this last-minute decision.

On Saturday, Attorney General Lori Swanson did not get the endorsement of the Democratic-Farmer-Labor Party at its convention. After that, she withdrew and the convention endorsed Matt Pelikan, a Minneapolis attorney and activist. Swanson turned around on Monday and decided to run for governor instead, with retiring Rep. Rick Nolan as her running mate.

Ellison enters a somewhat crowded race with Pelikan and two other Democrats in the mix.

Since 2017, the Minnesota congressman has served as deputy chair of the Democratic National Committee, where he has been viewed as a key ally of progressives in the party. He was appointed in the role after losing the chairmanship race to President Obama’s former Secretary of Labor Tom Perez.

“The first decision I made as DNC Chair was to appoint Keith Ellison as my deputy,” Perez said in a statement to The Daily Beast on Tuesday. “Keith is a born leader, a brilliant organizer, and a fierce fighter for the Democratic values of inclusion and opportunity for all Americans. And as Deputy Chair, he has been an invaluable voice in shaping our party’s future.”

The statement continued: “Whether it’s his leadership of our Winning with Partners program or his engagement of grassroots voters across the country, he has helped our party reach new voters and win elections up and down the ballot. I have come to know Keith as someone who is passionate about finding every possible way to help the greatest number of Americans achieve a better quality of life. And I have witnessed that passion in every single decision he has made, including whether to continue the fight in Congress or to run and serve as Minnesota's chief law enforcement official. I’m lucky to call Keith a friend, and I couldn’t be prouder of what we’ve accomplished together. Thanks to his ideas, his energy, and his steadfast commitment to our shared values, Keith has made our party stronger.”

The Daily Beast has confirmed that Ellison will remain in his role at the DNC.