Republican senators who have been a thorn in President Trump's side are beginning to see the political consequences of opposing the White House as pro-Trump activists start to mobilize.

Just this week, it was revealed that conservative billionaire and Trump benefactor Robert Mercer would be contributing $300,000 to a super PAC supporting a primary challenger to Arizona GOP Sen. Jeff Flake. The Republican lawmaker has sparred with Trump on immigration and is promoting a book that argues the GOP is in “denial” about the president.

Nevada Republican Sen. Dean Heller – who gave only tepid support to Trump’s presidential bid and the subsequent push to repeal and replace ObamaCare – also learned this week he would face a primary challenge from a Trump backer who has run unsuccessfully for Senate before.

Senate Majority Leader Mitch McConnell, too, is feeling the heat from Trump and his base as the president vents about the Kentucky Republican’s inability to get health care legislation passed.

Flake, though, has been the most overt about his displeasure with the president -- making the TV rounds to discuss his book ahead of his re-election race next year.

"If this was our Faustian bargain, then it was not worth it," Flake writes in "Conscience of a Conservative." "If ultimately our principles were so malleable as to no longer be principles, then what was the point of political victories in the first place?"

The White House has not shied from hitting back.

“I think Senator Flake would serve his constituents much better if he was less focused on writing a book and attacking the president than passing legislation,” Press Secretary Sarah Sanders said last week when asked if the president would back a challenger.

Politico first reported, though, that Mercer plans to donate to the super PAC backing Flake challenger Kelli Ward, a former state senator who unsuccessfully ran against Arizona Sen. John McCain in 2016.

Speaking to Fox News’ Dana Perino on "The Story" last week, Flake denied being worried about a primary challenge.

“I'm going to run, run hard, have a good campaign, and I feel good about it,” the senator said.

Like Flake, Heller is facing a primary challenge in Nevada from the right: businessman Danny Tarkanian, the son of legendary Nevada basketball coach Jerry Tarkanian.

Heller has long been considered vulnerable but his efforts to at least avoid a primary challenge grew more complicated when he declined to back the Republican-controlled Senate’s early ObamaCare overhaul plan.

At one point, a pro-Trump group called America First Policies briefly took out advertisements against Heller over his health care stance.

GOP SEN. HELLER DRAWS 2018 PRIMARY CHALLENGE FROM TRUMP SUPPORTER

Heller ultimately backed a scaled-back measure. But the overall repeal effort failed, denying Trump, at least for now, his first major legislative victory.

Still, some Republicans are skeptical about Tarkanian’s chances. The candidate most recently lost a 2016 GOP primary bid for the seat of retiring Senate Democratic leader Harry Reid.

"I think that Dean Heller has opened himself up to a challenge, but I don't think that Danny is the person to make that successful challenge," Republican strategist Rory McShane said Wednesday. "Beating Dean Heller would take the support of a lot of national groups like Club for Growth and the National Association of Gun Rights. It would be tough for Danny to win a primary without a lot of those national groups behind him."

Meanwhile, McConnell, who is not up for re-election this year, has been facing the wrath of Trump and his supporters after saying in a speech that Trump had “excessive expectations about how quickly things happen in the democratic process."

“Hey Kentucky--time to tell @SenateMajLdr McConnell to stop rolling over for the Dems, advance the Trump agenda, or step aside,” conservative radio host Laura Ingraham tweeted Thursday.

Trump himself has been dinging McConnell on Twitter for not getting a health care bill through the Senate, despite Republicans pledging to repeal ObamaCare for years.

“Can you believe that Mitch McConnell, who has screamed Repeal & Replace for 7 years, couldn't get it done,” the president tweeted. “Must Repeal & Replace ObamaCare!”

Fox News' Joseph Weber contributed to this report.