(WASHINGTON) -- After a tough two-month battle characterized by tough interrogation and a partisan divide, the Senate voted 58-41 to confirm Chuck Hagel -- President Obama's nominee -- as secretary of defense Tuesday afternoon.
The vote was called at 5:07 p.m. Sen. Elizabeth Warren, D-Mass., was in the chair.
Only four Republicans broke party lines to vote in Hagel's favor. They included Sens. Thad Cochran of Mississippi, Richard Shelby of Alabama, Mike Johanns of Nebraska and Rand Paul of Kentucky, though Paul had voted against moving forward with the vote earlier Tuesday.
Sen. Frank Lautenberg, D-N.J., did not vote.
Before a cloture vote to close the debate and bring Hagel's nomination to a vote, Senate Majority Leader Harry Reid, D-Nev., warned Republicans against continuing their partisan fight against the nominee.
"Senate Republicans have delayed for the better part of two weeks for one reason: partisanship," Reid said. "Politically motivated delays send a terrible signal to allies around the world, and they send a terrible signal to tens of thousands of Americans serving in Afghanistan, other parts of world and those valiant people who are serving here in the United States. For the sake of national security, it's time to set aside this partisanship."
The measure to move forward passed by a vote of 71-27. It needed at least 60 votes to pass.
Some Republican senators took the time before the vote to take a last stab at Hagel.
John Cornyn, R-Texas, who was one of 15 senators who sent a letter to Obama last week calling for him to withdraw his nomination of Hagel, said Hagel had proved that he's ill-prepared to assume the defense secretary post.
"There's simply no way to sugarcoat it," Cornyn said. "Sen. Hagel's performance before the Senate Armed Services Committee was remarkably inept, and we should not be installing a defense secretary who is obviously not qualified for the job and who holds dangerously misguided views on some of the most important issues facing national security policy for our country. Sen. Hagel is clearly the wrong man for the job."
The Senate returned Tuesday after a week off from debating Hagel's pros and cons.
Hagel succeeds Leon Panetta as defense secretary.
Copyright 2012 ABC News Radio