WASHINGTON -- In a rare show of defiance of the National Rifle Association, the Senate on Monday confirmed Dr. Vivek Murthy to serve as surgeon general of the United States. Murthy's nomination had been stalled for nearly a year due to comments he made in support of stricter gun laws.

Murthy is a Harvard- and Yale-educated physician, and has identified obesity and chronic disease as areas of focus for his tenure. He will be the first Indian American to hold the position.

The Senate voted, 51-43, to confirm Murthy for the nation's top public health post, which has been vacant since July 2013.

Sen. Mark Kirk (Ill.) was the lone Republican to vote for Murthy, while three Democrats voted against him: Sens. Joe Manchin (W.Va.), Joe Donnelly (Ind.) and Heidi Heitkamp (N.D.). Murthy needed just a simple majority vote based on the rules changes enacted by the Senate last year. A group of doctors watched Murthy's vote from the gallery and broke out into cheers and applause when it was clear that he had been confirmed.

Murthy's confirmation represents a defeat for the NRA, which mounted fierce opposition to his nomination earlier this year because of previous statements characterizing guns as a "health care issue." Although Murthy cleared the Senate Committee on Health, Education, Labor and Pensions in March, several Democrats who faced tough re-election battles had threatened to oppose his nomination if Senate Majority Leader Harry Reid (D-Nev.) brought it to the floor.

After November's midterm elections, Reid indicated he would revive Murthy's nomination, which the White House said was a top priority prior to Democrats ceding control of the upper chamber. It remained unclear in the last few weeks whether Murthy would still have enough votes to be confirmed, but several moderate Democrats came on board, as health care activists and the Indian-American community rallied in his support.

More than 100 national organizations backed Murthy's nomination, and top health administration officials under Presidents George W. Bush and Bill Clinton also penned letters urging his confirmation. The crisis over Ebola also offered Murthy's supporters a notable opportunity to draw attention to the vacancy at surgeon general.

The NRA tried again on Monday to sway senators against Murthy, saying it would score the vote for future political campaigns.

"The NRA's position hasn't changed. America's next surgeon general should not be a political operative whose professional inexperience has been a source of bipartisan concern," NRA spokesman Andrew Arulanandam said in a statement.

Republicans also contested the nomination on the Senate floor, citing not only Murthy's views on guns but also his advocacy for the Affordable Care Act as part of a group he co-founded called Doctors for America, formerly known as Doctors for Obama.

Sen. Dick Durbin (Ill.), the No. 2 Democrat in the Senate, told colleagues not to succumb to pressure.

"Go to an emergency room on a Friday or Saturday night, and you tell me that gun violence isn't a public health issue," he said. "Gun violence is a public health issue -- no apology necessary."

President Barack Obama celebrated Murthy's confirmation in a statement shortly after the vote.

"As ‘America’s Doctor,’ Vivek will hit the ground running to make sure every American has the information they need to keep themselves and their families safe. He’ll bring his lifetime of experience promoting public health to bear on priorities ranging from stopping new diseases to helping our kids grow up healthy and strong," Obama said. "Vivek will also help us build on the progress we’ve made combatting Ebola, both in our country and at its source. Combined with the crucial support for fighting Ebola included in the bill to fund our government next year, Vivek’s confirmation makes us better positioned to save lives around the world and protect the American people here at home."

Murthy's confirmation also was met with praise from anti-gun violence groups, which are all too familiar with the politics of gun control.

Americans for Responsible Solutions, the group co-founded by former Rep. Gabby Giffords (D-Ariz.) and her husband Mark Kelly, said a vote on Murthy was "long overdue."

"Tonight, the United States Senate did the responsible thing: It stood up to the gun lobby, stood up for common sense, and voted to ensure that the United States has a qualified medical professional as its top doctor," Kelly said in a statement on behalf of the group.

John Feinblatt, president of the Michael Bloomberg-backed Everytown for Gun Safety, also hailed Murthy's confirmation as a victory against the NRA.

"This is about more than just the confirmation of our country’s top doctor, it’s also a defeat for the gun lobby that has fought tooth-and-nail to keep gun violence prevention off of the agenda in Washington," Feinblatt said in a statement. "For decades the NRA has suppressed funding for research to understand gun violence and pushed for legislation to muzzle doctors and military leaders from being able to talk to their patients or troops about firearm safety."