The vote, which allows the Senate to begin debate on health care reform legislation, was a victory for Trump, who had spent weeks cajoling, strong-arming and warning Republicans to get on board with his effort to overhaul Obamacare.
In recent weeks, several measures have been proposed -- but ultimately collapsed, revealing fissures within the Republican Party on how to reach a goal they have had since the Affordable Care Act was passed in 2010.
With Republican leaders earning the chance to begin debate, the path forward was no clearer than before the vote, as a multitude of different plans was now being considered for the legislation.
Despite the step forward, several Republicans remain skeptical about how the effort to dismantle the Affordable Care Act might affect millions of Americans.
Trump was nevertheless thrilled.
"This was a big step," he said shortly after the vote at a press conference in the White House Rose Garden, calling Obamacare a "disaster for the American people."
McCain, who announced last week he is suffering from brain cancer, cast a critical vote for the measure, leaving senators evenly split and forcing Vice President Mike Pence to break the tie for a 51-50 final count.
All 48 Democrats and independents voted against, along with Republicans Susan Collins and Lisa Murkowski.
McCain received a standing ovation from his colleagues as he entered the chamber, having made the trip from his home state of Arizona, where he was convalescing.
While he called for greater bipartisan cooperation in Congress, McCain directly denounced the closed-door process that has marked the health care reform effort, saying it was wrong to try to force lawmakers to "swallow our doubts and force it past a unified opposition."
"I don't think that's going to work in the end, and probably shouldn't," he said.
Senators will now launch into long hours of debate, with Republican conservatives and moderates divided over how to proceed.
The first votes on changes to the bill could come as early as Tuesday night, a Republican leadership aide said.
One Republican plan under consideration would dismantle Obamacare but delay actual implementation of the repeal to allow time for a viable replacement to be crafted. It is expected to fail.
Another plan that repeals and replaces Obamacare, but includes other elements and is likely to require a 60-vote threshold because of procedural rules, is also set to fail.
The question then becomes what can get over the finish line. Lawmakers have begun speaking about a "skinny" repeal that would dismantle only parts of the Affordable Care Act, but it is not yet clear whether the plan will gain traction this week.
"Today's vote to begin debate is the first step."
Trump has repeatedly grilled fellow Republicans for not following through on their -- and his -- campaign pledge to repeal and replace Obamacare.
On the Democratic side, senators urged cooperation -- and restraint.
"I can't believe this process and the hard and calculated rhetoric we see," Democratic Senator Joe Manchin of West Virginia said Tuesday.
"The Affordable Care Act is not a perfect piece of legislation. It needs repair. We both agree to that. Then we need to fix it."
Forecasts by the non-partisan Congressional Budget Office on various health reform bills have predicted that millions of Americans would lose health care if the measures become law.
In the case of a bill that repeals Obamacare and provides no replacement, 32 million more people would be uninsured by 2026 as compared to current law, CBO forecast.
Some Republicans have expressed concern with how the legislation would impact Medicaid, the health insurance program for the poor and the disabled.
The latest repeal-and-replace bill would roll back an expansion of Medicaid and slash its federal funding.
It would also end the mandate that most individuals have health insurance, and allow states to let insurance companies offer bare-bones plans not allowed under current law.
Democrats have blasted the secretive process, accusing Republican leaders of rushing a mammoth bill to the floor without sufficient discussion or debate.
Several outside health groups have criticized the various iterations of the repeal-and-replace effort.
One of the most emphatic rejections came from a group of some 7,000 Catholic nuns, who wrote Senate leaders on Monday to say the bill "would be the most harmful legislation for American families in our lifetimes."
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)