While both Republicans and Democrats said the health care law was not the only factor in the race, Mr. Jolly’s victory guarantees it will become a focus in competitive races elsewhere.

“It is clear to me that the Obamacare message worked for Jolly, particularly for the last two and a half weeks in the campaign,” said Brett Doster, a Republican political consultant who served as senior adviser in Florida to Mitt Romney’s presidential campaign. “I would be very surprised to see Republican candidates not using the issue. The president doubled down on it, national Democrats doubled down on it, and now it’s going to be a political football for the rest of the country.”

The race was awash in spending by outside groups, more from conservative than liberal ones, who sought to influence voters with negative advertising. This was decisive for Mr. Jolly, because Ms. Sink outraised him three to one and was ahead in the race until recently.

Republicans had a 13-point advantage in turnout in the district, even though the number of voters is almost equally divided between the two main parties, said Ms. Sink’s pollster, Geoff Garin. Ms. Sink nearly overcame the tilt, but not quite.

And while Ms. Sink did well in leveling the playing field among absentee voters, generally a big advantage for Republicans, Mr. Jolly did surprisingly well with those who went to the polls on Tuesday, capturing 12 percent more of the votes that day.

Democrats tried to put the best face on a bad result.

“This district will be in play in November, I can guarantee that,” Mr. Israel said. “Had this race been in November instead of March, then Alex Sink would be Congresswoman Alex Sink, which is why I am so hopeful she will run.”

As early as Monday, the White House political director, David Simas, expressed anxiety about the race, phoning reporters to pre-emptively play down the health law as a factor, something that Democratic leaders continued to do on Wednesday.