Republican Sen. Jeff Flake on Friday said a Republican "needs" to challenge President Donald Trump in 2020, and suggested it might even be him.

"I’ve not ruled it out. I’ve not ruled it in. Just, somebody needs to run on the Republican side," Flake said.

Flake has been a vocal critic of Trump and his rhetoric, despite the fact both are Republicans.

The Arizona senator is set to retire in January 2019.

Republican Sen. Jeff Flake on Friday said a Republican "needs" to challenge President Donald Trump in 2020, and suggested it might even be him.

Flake said the party's image has suffered under Trump and contended the president is doing real, long-term damage to the GOP.

"I hope somebody does [run], just to remind Republicans what it means to be conservative and what it means to be decent. We’ve got to bring that back," Flake told Politico on Friday. "You can whip up the base for a cycle or two but it wears thin. Anger and resentment are not a governing philosophy."

The Arizona senator said he had "not ruled out" a potential run.

"I’ve not ruled it out. I’ve not ruled it in. Just, somebody needs to run on the Republican side," Flake said.

Flake on Friday also said he has no intention of returning to Congress in the near future even with an Senate seat that will be up for the taking in Arizona come 2020, but said he's not "swearing off politics."

Flake has been a vocal critic of Trump and his rhetoric, despite the fact both are Republicans. He's frequently contended Trump is eroding both the GOP and the country's inherent values with his bombastic approach to the presidency.

The senator has at times been applauded for defending mainstream conservatism in this regard, but critics feel he's more bark than bite given he still tends to vote in line with Trump. According to an analysis from FiveThirtyEight, Flake has voted in line with Trump's positions roughly 84% of the time.

Read more: Jeff Flake talks a good game about Trump, but what is he doing?

With that said, Flake's public disdain for Trump is still quite mutual. The president has a well known habit of responding to anyone who criticizes or challenges him, and Flake has been no exception.

After the Arizona senator proposed holding a floor vote on legislation to protect special counsel Robert Mueller in the wake of the controversial ousting of Attorney General Jeff Sessions, for example, the president on Friday attacked Flake on Twitter.

Trump tweeted, "Jeff Flake(y) doesn’t want to protect the Non-Senate confirmed Special Counsel, he wants to protect his future after being unelectable in Arizona for the 'crime' of doing a terrible job! A weak and ineffective guy!"

Read more: McConnell rejects vote on bill to protect Mueller, says special counsel is 'not under threat'

Flake announced last year he would not seek reelection and is set to retire when his term expires in January 2019.

When he announced his retirement, Flake described Trump as "dangerous to democracy."

"Reckless, outrageous, and undignified behavior has become excused as telling it like it is when it is actually just reckless, outrageous, and undignified," Flake said at the time. "And when such behavior emanates from the top of our government, it is something else. It is dangerous to a democracy."