President Trump celebrated with House Republicans in the White House Rose Garden last year when they passed a bill to undo the Affordable Care Act and its protection for Americans with preexisting medical conditions.

On Wednesday, less than two weeks before the midterm elections, Trump falsely claimed that ensuring coverage for those with asthma, diabetes, pregnancy and other conditions was a Republican priority, rather than a Democratic one.

“Republicans will totally protect people with Pre-Existing Conditions, Democrats will not! Vote Republican,” Trump said Wednesday in a tweet.

The misleading statement about the 2010 health care law, which passed with only Democratic votes, reflects a strategy that Republicans are hoping will pay off Nov. 6: Repeatedly tell voters that the GOP supports one of the ACA’s most popular provisions and hope they ignore or forget eight years of votes, rhetoric, legal efforts and bureaucratic moves to gut the law.

“Overall, this is something that voters want to hear candidates talk about,” Ashley Kirzinger, a senior survey analyst at the Kaiser Family Foundation, said of protections for those with preexisting conditions. What casts uncertainty on the election, she said, is that voters “may not be making the connection that repealing the ACA would also mean an elimination of those protections.”

The Republican messaging shift, which extends from the president to Senate and House candidates in competitive races across the country, comes amid a growing air of uncertainty surrounding next month’s election.

Several factors have been moving in Republicans’ favor in recent weeks, including Trump’s rising approval rating and a party base newly energized by the battle over Supreme Court Justice Brett M. Kavanaugh.

Yet health care remains the Republican Party’s Achilles’ heel, and GOP candidates such as Arizona Senate nominee Rep. Martha McSally have found themselves facing tough questions about how they reconcile their current support for coverage for preexisting conditions with their longtime efforts to repeal the health-care law.

McSally, who is facing Democrat Kyrsten Sinema in one of the country’s most closely watched Senate races, is drawing attention with a new ad in which she claims that she is “leading the fight to . . . force insurance companies to cover preexisting conditions” — even though she not only voted for legislation that would have weakened such protections but rallied other House Republicans.

McSally was peppered with questions from reporters in Arizona after a campaign event Wednesday afternoon.

“It’s not true. It’s not true. Stop parroting Democrat talking points,” McSally told a journalist who challenged her over previous health-care votes, according to video of one heated exchange posted by the Capitol Hill newspaper Roll Call. “Health care is a complex issue.”

Other Republicans in tight races, such as Wisconsin Gov. Scott Walker and Sen. Dean Heller (Nev.), are delivering a similar message. On Wednesday afternoon, Walker tweeted a link to a campaign ad in which he tells viewers that his wife has diabetes, his brother has a heart condition and his mother is a cancer survivor.

“Pre-existing conditions are personal to me,” Walker said in the tweet, pledging that those conditions “always will be” covered as long as he is governor.

In fact, Wisconsin is one of the 20 states that has filed a lawsuit arguing the ACA with its protections for preexisting conditions is unconstitutional, a legal fight that the Trump administration has backed.

Democrats — who have long pummeled their opponents with ads on the issue — are responding with fury to the latest Republican effort, and several on Wednesday accused the president of gaslighting voters.

“Good morning, America,” Senate Minority Leader Charles E. Schumer (D-N.Y.) fired back at Trump in a tweet, saying simply, “This is a lie.”

A Washington Post-ABC News poll earlier this month found that Democrats have a 16-percentage-point advantage among registered voters on the question of who they trust to handle health care overall. Eighty-two percent of respondents cited health care as either “one of the single most important issues” or “a very important issue” in their vote for Congress this year.

And a recent Kaiser Family Foundation survey showed that Democrats are trusted over Republicans by more than 2-to-1 to continue preexisting condition protections.

Yet complicating matters for Republicans is that a substantial portion of their party base continues to support a repeal of the ACA.

According to a Kaiser Family Foundation survey of voters in Florida and Nevada, a plurality of registered Republicans in each of the two battleground states cites repeal of the law as the most important health-care issue in determining their vote for Congress. Second on the list: protecting preexisting conditions.

A recent analysis by the Wesleyan Media Project found that between Sept. 18 and Oct. 15, nearly 55 percent of TV ads supporting Democratic candidates focused on health care — a messaging offensive that Kirzinger said is indicative of Democrats’ newfound confidence on the issue.

“In previous cycles, most Democratic candidates didn’t want to talk about health care. It wasn’t seen as a winning issue,” she said.

The Republican Party’s messages on the issue have been decidedly mixed.

In a tweet last week, Trump wrote that “[a]ll Republicans support people with pre-existing conditions, and if they don’t, they will after I speak to them.”

“I am in total support,” he added. “Also, Democrats will destroy your Medicare, and I will keep it healthy and well!”

Yet Trump has repeatedly promised to repeal the law, known as Obamacare, and bemoaned the failure of a Republican-led effort to do so last year. As recently as last week, Senate Majority Leader Mitch McConnell (R-Ky.) said he wants to take another shot at repealing the health-care law after the midterm elections.

“If we had the votes to completely start over, we’d do it,” McConnell said in an interview with Reuters, calling his party’s failure to repeal the law “the one disappointment of this Congress from a Republican point of view.”

Meanwhile, under a Trump administration rule finalized in August, insurers are permitted to sell short-term health insurance plans that do not have to cover preexisting conditions and certain kinds of health care that the ACA requires.

Senate Democrats fell one vote short in a bid this month to overturn the rule, deriding the less expensive policies as “junk” plans.

With polls showing that large majorities of Americans favor keeping protections for those with preexisting conditions intact, Republican candidates have increasingly sought to assure voters that they support those protections despite a years-long GOP effort to repeal the 2010 law, a partial 16-day government shutdown in 2013 to try to defund it and dozens of House votes to revamp or scrap the law.

Republican strategist Michael Steel, who was previously an adviser to former House speaker John A. Boehner, said that Sen. John McCain’s (R-Ariz.) decisive thumbs-down vote on repealing the ACA last year “signaled the end of that war and the beginning of a new fight.”

In the current battle, he said, Republican candidates should not only focus on critiquing the “Medicare-for-all” plan promoted by some progressives but also continue to “make it absolutely clear” that they support protections for preexisting conditions.

“That’s the reason Republicans have always said ‘repeal and replace,’ not just ‘repeal,’ ” Steel said. “It’s always about figuring out which portions of the ACA make sense.”

Scott Clement contributed to this report.