The U.S. Senate voted to confirm Chuck Hagel on Tuesday as President Barack Obama's new secretary of defense.

Senators backed the nomination by a 58-41 vote, as voting continued, with only about four Republicans joining Democrats in support of Hagel, a Republican former U.S. senator from Nebraska.

Hagel needed only 51 votes to be confirmed as the new civilian leader at the Pentagon.

Earlier Tuesday, the Senate voted 71-27 to end debate and move forward, almost two weeks after Republicans launched a filibuster to block Hagel's nomination. It was the first time such a procedural tactic had been used to delay consideration of a nominee for secretary of defense.

Many Republicans, prominent among them Senator John McCain, have fiercely opposed Hagel, a former Republican senator from Nebraska who angered party leaders when he criticized former President George W. Bush's handling of the Iraq war. Some, including American Jewish organizations, had also raised questions about whether Hagel is sufficiently supportive of Isral or tough enough on Iran.

Republican senators delayed Hagel's nomination on February 14 in a rare exercise of the Senate's power to block one of the president's choices for his cabinet.

Two American Jewish groups - the American Jewish Commitee and the Anti-Defamation League, had both called for further review of Hagel's record a few weeks ago in light of an account of a 2007 speech in which he allegedly said the State Department acted as an "adjunct" of Israel's Foreign Ministry.

"Chuck Hagel has served this country, and his state, with distinction, as we have had the privilege to tell him in person," the American Jewish Committee said in a statement January 15. "But in light of his complex record in the Senate and controversial statements he has made since his public service on strategic and political affairs – notably grappling with the range of pressing Middle East issues – AJC believes that further Senate deliberation is called for before any final vote is taken."

Republicans had been blocking the confirmation of their former colleague and Vietnam veteran, saying they wanted more details from the White House on the events surrounding the attack on the U.S. mission in Benghazi last September in which Ambassador Chris Stevens and three other Americans were killed. The attack became a topic of fierce debate before the November elections.

Obama reacted immediately, accusing Republicans of playing politics with the nation at war.