Flake gave an ominous warning to the President if he doesn't change his style. (Win McNamee/Getty Images)

Sen. Jeff Flake warned that President Trump will face a primary challenge or an independent opponent in 2020 if the Republican continues his bombastic ways.

"I do believe if the President is running for re-election, if he continues on the path that he's on, that that's going to leave a huge swath of voters looking for someone else," Flake (R-Ariz.) said in an interview with ABC News' "This Week" that aired Sunday.

But will that challenger be Flake, who's previously bashed the President and set to retire at the end of 2018?

"I don't rule anything out but it's not in my plans," a coy Flake said.

The junior senator for Arizona has been critical about the path his party is taking.

He pointed to rallies for Trump and other firebrand conservatives, where the audiences are like "spasms of a dying party."

Flake said he'd work with the President, but implied the commander-in-chief wasn't always truthful. (SAUL LOEB/AFP/Getty Images)

"When you look at the lack of diversity, sometimes, and it depends on where you are, obviously, but by and large, we're appealing to older white men and there are just a limited number of them, and anger and resentment are not a governing philosophy," he said in the interview.

Flake said his faith in the GOP was restored when Alabama Republican Senate candidate Roy Moore lost in a special election earlier this month despite having Trump's endorsement.

The lawmaker wrote a $100 check to his Democratic opponent, Doug Jones, and refused to back Moore, who was accused of sexual misconduct with several teenage girls when he was in his 30s.

After Moore's defeat, Flake told "This Week," that "maybe we can turn back."

"But if we continue to go down that path, just to drill down on the base, I think you'll have a lot of people realize there is no future for them in this party," he said. "I hope, like I said, with the election results in Alabama, that maybe the party's realizing that, we have to change."

Flake also said he hopes the defeat would marginalize former White House Chief Strategist Steve Bannon, who pushed for Moore's candidacy.

Flake said he hasn't thought deeply about running against Trump in 2020. (ABC)

"The last thing we need is to push that ultra nationalist, ethno-nationalist, protectionist element of the party," Flake told ABC News. "It's not good for us."