Senator John McCain of Arizona, who just this week returned to the Senate after receiving a diagnosis of brain cancer, cast the decisive voteto defeat the proposal, joining two other Republicans, Susan Collins of Maine and Lisa Murkowski of Alaska, in opposing it.
The 49-to-51 vote was also a humiliating setback for the Senate majority leader, Mitch McConnell of Kentucky, who has nurtured his reputation as a master tactician and spent the last three months trying to devise a repeal bill that could win support from members of his caucus.
As the clock ticked toward the final vote, which took place around 1:30 a.m., suspense built on the Senate floor. Mr. McCain was engaged in a lengthy, animated conversation with Vice President Mike Pence, who had come to the Capitol prepared to cast the tiebreaking vote for the measure. A few minutes later, when Mr. McCain ambled over to the Democratic side of the chamber, he was embraced by Senator Dianne Feinstein, Democrat of California. A little later Senator Amy Klobuchar, Democrat of Minnesota, put her arm around Mr. McCain.
The roll had yet to be called, but the body language suggested that the Trump administration had failed in its effort to flip the Arizona senator whom President Trump hailed on Tuesday as an “American hero.’’
Many senators announced their votes in booming voices. Mr. McCain quietly signaled his vote with a thumbs-down gesture.
The truncated Republican plan that ultimately fell was far less than what Republicans once envisioned. Republican leaders, unable to overcome complaints from both moderate and conservative members of their caucus, said the skeletal plan was just a vehicle to permit negotiations with the House, which passed a much more ambitious repeal bill in early May.
The “skinny repeal” bill, as it became known at the Capitol this week, would still have had broad effects on health care. The bill would have increased the number of people who are uninsured by 15 million next year compared with current law, according to the nonpartisan Congressional Budget Office. Premiums for people buying insurance on their own would have increased roughly 20 percent, the budget office said.
Unlike previous setbacks, Friday morning’s health care defeat had the ring of finality. After the result was announced, the Senate quickly moved on to routine business. Mr. McConnell canceled a session scheduled for Friday and announced that the Senate would take up the nomination of a federal circuit judge on Monday afternoon.
With so many senators in both parties railing against the fast-track procedures that Republican leaders used, a return to health care seemed certain to go through the committees, where bipartisanship and deliberation are more likely.
“We are not celebrating,” said the Senate Democratic leader, Chuck Schumer of New York. “We are relieved that millions and millions of people who would have been so drastically hurt by the three proposals put forward will at least retain their health care, be able to deal with pre-existing conditions.”
Mr. McConnell said he was proud of his vote to start unwinding the Affordable Care Act. “What we tried to accomplish for the American people was the right thing for the country,” Mr. McConnell said. “And our only regret tonight, our only regret, is that we didn’t achieve what we had hoped to accomplish.”
The new, eight-page Senate bill, called the Health Care Freedom Act, was unveiled just hours before the vote. It would have ended the requirement that most people have health coverage, known as the individual mandate. But it would not have put in place other incentives for people to obtain coverage — a situation that insurers say would leave them with a pool of sicker, costlier customers. It would also have ended the requirement that large employers offer coverage to their workers.
The “skinny repeal” would have delayed a tax on medical devices. It would also have cut off federal funds for Planned Parenthood for one year and increased federal grants to community health centers. And it would have increased the limit on contributions to tax-favored health savings accounts.
In addition, the bill would have made it much easier for states to waive federal requirements that health insurance plans provide consumers with a minimum set of benefits like maternity care and prescription drugs. It would have eliminated funds provided by the Affordable Care Act for a wide range of prevention and public health programs.
Before rolling out the new legislation, Senate leaders had to deal with a rebellion from Republican senators who demanded ironclad assurances that the legislation would never become law.
Mr. McCain and Senators Lindsey Graham of South Carolina and Ron Johnson of Wisconsin insisted that House leaders promise that the bill would not be enacted.
“I’m not going to vote for a bill that is terrible policy and horrible politics just because we have to get something done,” Mr. Graham said at a news conference, calling the stripped-down bill a “disaster” and a “fraud” as a replacement for the health law.
Mr. Graham eventually voted for the measure after receiving an assurance from the House speaker, Paul D. Ryan, that the two chambers would negotiate their differences if the Senate passed the legislation.
“If moving forward requires a conference committee, that is something the House is willing to do,” Mr. Ryan said in a statement. “The reality, however, is that repealing and replacing Obamacare still ultimately requires the Senate to produce 51 votes for an actual plan.”
But Mr. Ryan left open the possibility that if a compromise measure had failed in the Senate, the House could still pass the stripped-down Senate health bill. That helped push Mr. McCain to “no.”
Republican senators found themselves in the strange position of hoping their bill would never be approved by the House.
“It may very well be a good vehicle to get us into conference, but you got to make sure that it’s not so good that the House simply passes it rather than going to conference,” said Senator Michael Rounds, Republican of South Dakota. Mr. Rounds, who built a successful insurance business in his home state, said he was concerned that “the markets may collapse” if the Senate bill ever took effect.
Two influential House conservatives made clear that they did not want to simply pass the Senate bill. Representative Mark Walker, Republican of North Carolina and the chairman of the conservative Republican Study Committee, said he favored a conference, calling the bill “ugly to the bone.”
And Representative Mark Meadows, Republican of North Carolina and the chairman of the hard-line Freedom Caucus, said that for many conservatives, it would be a “nonstarter” to send President Trump a bill that has “gotten so skinny that it doesn’t resemble a repeal.”
But senators had at least some reason to be nervous. The House majority leader, Kevin McCarthy of California, notified House members that “pending Senate action on health care,” the House schedule could change, and that “all members should remain flexible in their travel plans over the next few days.” That did not sound like a man preparing for protracted House-Senate negotiations.
Representative Chris Collins, Republican of New York and a key ally of Mr. Trump, said the stripped-down bill would be “better than nothing” if it became apparent that the Senate did not have the votes for a more ambitious bill.
“It becomes a binary choice,” he said. “If it’s this or nothing, who wants to go home and say I did nothing?”
“No one can guarantee anything,” he added, sending a message to senators wanting assurances.
Even some senators who voted for the measure Friday conceded that its enactment could have been disastrous. It would have repealed the mandate that most Americans have insurance, without another mechanism to push Americans to maintain insurance coverage. Under those circumstances, healthy people could wait to buy insurance until they are sick. The insurance markets would become dominated by the chronically ill, and premiums would soar, insurers warned.
America’s Health Insurance Plans, the Blue Cross Blue Shield Association and the American Medical Association all expressed similar concerns.
“We would oppose an approach that eliminates the individual coverage requirement, does not offer alternative continuous coverage solutions, and does not include measures to immediately stabilize the individual market,” said America’s Health Insurance Plans, a trade group for the industry.
On the other side, the Trump administration twisted arms. Mr. Trump directed Interior Secretary Ryan Zinke to call Ms. Murkowski, the Alaska senator, to remind her of issues affecting her state that are controlled by the Interior Department, according to people familiar with the call, who requested anonymity because they were not authorized to speak to the press.
Ms. Murkowski confirmed to reporters that she had received a call from Mr. Zinke, but she declined to describe the details. However, people familiar with the call described her reaction to it as “furious.”