Richard Cordray is stepping down as the head of the Consumer Financial Protection Bureau.

Cordray said Wednesday that he plans to resign as director at the end of the month.

"It has been a joy of my life to have the opportunity to serve our country as the first director of the Consumer Bureau by working alongside all of you here. Together we have made a real and lasting difference that has improved people's lives," he said in a note to CFPB staff.

Republicans have long loathed Cordray, who they see as having overstepped his regulatory authority and as lacking oversight.

After President Trump's election, some called for his ouster.

"It's time to fire King Richard," Sen. Ben Sasse of Nebraska said last January.

But his departure may have more to do with his personal political aspirations than GOP pressure. Cordray is widely thought to be preparing a 2018 run for governor of Ohio. Before he was appointed to lead by the CFPB by President Obama in 2012, he served as Ohio's attorney general and treasurer.

With Cordray gone, President Trump will have a chance to rework the consumer protection agency, which was created under the 2010 Dodd-Frank regulatory reform law following the 2008 financial crisis.

"[Cordray's CFPB has] done a lot of good, but they've also been very controversial. It's been a real political football since its inception, and it will likely look and operate quite differently once Cordray leaves," Matt Schulz, a senior industry analyst with CreditCards.com, said in a statement.

As president, Trump has come out against regulations that he sees as hurting businesses -- a position that's put his administration and the CFPB on opposite sides of many issues.

Earlier this month, Trump signed legislation repealing a rule issued by the CFPB in July. The provision made it easier for consumers to team up to sue banks and credit card companies.

Related: Trump kills rule that made it easier for people to sue banks

Cordray wrote Trump a personal letter asking him not to sign the resolution, and said Trump's decision ultimately "[tipped] the scales of justice in favor of Wall Street banks."

Analysts expect that Trump's new pick to lead the agency will be less aggressive.

"Now that Director Richard Cordray has resigned, a new Trump-appointed Director will focus on deregulation and loosening compliance requirements," Bloomberg Intelligence analysts Nathan Dean and Elliott Stein said in a note Wednesday.

Democrats, meanwhile, are already lining up to scrutinize Trump's nomination. In a statement, Sen. Sherrod Brown -- the top Democrat on the Senate Banking Committee -- said all Americans owe Cordray a "debt of gratitude."

"The White House has said it wants to stand up for the middle class. If that's true, the President must nominate a successor who will put working people ahead of Wall Street," he said.

Sen. Elizabeth Warren, a Democrat from Massachusetts, said the new director "must be someone with a track record of protecting consumers and holding financial firms responsible when they cheat people."

"This is no place for another Trump-appointed industry hack," she said in a statement.