Vivek Murthy is a 37-year-old physician and instructor at Harvard Medical School

Receive the latest politics-first updates in your inbox

The Senate on Monday approved President Barack Obama's nomination of Dr. Vivek Murthy to serve as U.S. surgeon general, despite opposition from Republicans and some Democrats over his support for gun control and past statements that gun violence is a public health issue.

Murthy, 37, a physician at Boston's Brigham and Women's Hospital and instructor at Harvard Medical School, won confirmation on a vote of 51-43. He's a co-founder of Doctors for America, a group that has pushed for affordable health care and supports Obama's health care law.

Sen. John Barrasso, R-Wyo., said most of Murthy's career has been spent as an activist focused on gun control and other political issues, rather than on treating patients. "Americans don't want a surgeon general who might use this position of trust to promote his own personal campaign against the Second Amendment of the Constitution," Barrasso said.

Supporters said Murthy is well-qualified and noted his promise not to use the position as a bully pulpit for gun control.

The nation has been without a Senate-confirmed surgeon general since July 2013. The surgeon general does not set policy but is an advocate for the people's health.

Murthy's confirmation "makes us better positioned to save lives around the world and protect the American people here at home," Obama said in a statement. Murthy "will also help us build on the progress we've made combatting Ebola, both in our country and at its source" in West Africa.

Murthy's confirmation represented a rare defeat for the National Rifle Association, which told senators that a vote for Murthy would be scored against them when they rate lawmakers' votes during election campaigns.

Senate Majority Whip Richard Durbin, D-Ill., said Murthy has been "pilloried and excoriated" by the NRA and its supporters for his backing of stricter gun laws, including an assault weapons ban, and statements that gun violence is a public health issue.

Murthy has made clear he is not "aspiring to be the leading doctor in America to engage in a political debate, but rather to engage in public health debates about obesity and tobacco and things that make a dramatic difference to the lives of so many people who live in this country," Durbin said.

Murthy expressed support for gun control in a letter to Congress after the Newtown, Connecticut, school shooting.

His nomination was endorsed by more than 100 health organizations, including the American College of Physicians, the American Heart Association and the American Diabetes Association.

Sen. Joe Manchin, D-W.Va., a staunch supporter of gun rights, did not mention guns in a statement opposing Murthy but said he does not believe it's appropriate for America's top doctor to participate in political activism.

While he does not question Murthy's medical qualifications, Manchin said he wonders whether the public will believe that Murthy "can separate his political beliefs from his public health views."

Manchin was one of three Democrats to oppose Murthy, along with Sens. Joe Donnelly of Indiana and Heidi Heitkamp of North Dakota. Illinois Sen. Mark Kirk was the lone Republican to support Murthy.

Before founding Doctors for America, Murthy created a nonprofit that focused on HIV/AIDS education in India and the U.S. And he co-founded a technology company, TrialNetworks, that helps drug developers collaborate on clinical trials.

At a Senate hearing in February, Murthy said he wouldn't use the position to push gun control. He said his priorities include fighting obesity and helping communities promote healthier living.

The son of immigrants from India, Murthy told senators he was inspired to become a doctor while helping out on weekends at his father's family medicine clinic in Miami.