STORY HIGHLIGHTS
- Senate votes 58-41 to confirm former Nebraska senator, a Republican
- Fight for Cabinet post was deeply partisan, uphill battle for Hagel
- NEW: Obama says he will rely on Hagel's counsel on national security issues
- NEW: Hagel pledges to work with Congress; Will be sworn in on Wednesday
Washington (CNN) -- Chuck Hagel's rocky and inauspicious path to leadership of the Pentagon could haunt him if he doesn't watch his step.
"If people feel Hagel makes a mistake in the future, they will come after him even harder than if this ugly process of recent weeks hadn't happened," said Michael O'Hanlon, a senior fellow at the Brookings Institution and a co-author of "Bending History: Barack Obama's Foreign Policy."
The former Nebraska senator's nomination as defense secretary was subject to harsh criticism from some fellow Republicans over past statements on sensitive political and national security matters.
His shaky performance at his confirmation hearing and the subsequent fierce political wrangling over his selection and on unrelated matters did not help his case.
But efforts to further delay his nomination were swept away on Tuesday as the Senate confirmed him, 58-41, with a handful of Republican votes in his corner. Hagel will be sworn in on Wednesday, succeeding Leon Panetta.
President Barack Obama, a former Senate colleague, called Hagel a patriot who "fought and bled for our country."
Obama said he will count on Hagel's "counsel and judgment" as the United States ends combat operations in Afghanistan and stays "ready to meet the threats of our time."
The task for Hagel, 66, going forward is to swiftly move past the protracted nomination battle, prove himself a strong and capable Pentagon chief, and repair relationships on Capitol Hill, said Fran Townsend, a former homeland security adviser to President George W. Bush.
"Of course, when he walks through the door he is bruised and battered. But I think we shouldn't overestimate the impact of that," Townsend said. "Frankly, once he is confirmed as secretary of defense and once he sits in the seat and takes on the mantle of responsibility, everyone in the Pentagon is going to stand up and salute smartly, as well they should."
Hagel, a decorated Vietnam veteran, said in a statement that he was honored to have been nominated and confirmed, and pledged to work closely with Congress to "ensure that we maintain the strongest military in the world."
With Hagel's confirmation, Obama has put in place another crucial piece of his second-term national security team. John Kerry has been installed as secretary of state and John Brennan is awaiting Senate action on his nomination to be CIA director. Thomas Donilon is already serving as national security adviser.
O'Hanlon said Hagel would not "be damaged goods" and the political outcry over his nomination would quickly be overshadowed by the latest budget drama engulfing Washington over spending cuts, which would hit the Pentagon hard, if enacted.
Bad feelings about Hagel stem, in part, from his 2007 comments that the "Jewish lobby intimidated lawmakers." Republicans who are already uncomfortable with Obama's policies toward Israel are uneasy about a defense secretary holding such views.
Israel's ambassador to the United States, Michael Oren, said in a statement that Israel "looks forward to working closely" with Hagel.
Hagel's criticism of the Iraq War, the Patriot Act, and his past positions on Iran and on U.S. military intervention also raised red flags with his opponents.
Moreover, he spoke about an ambassadorial nominee in the late 1990s as being "openly, ggressively gay," remarks for which he has since apologized. Obama ended the prohibition on gays and lesbians serving openly in the military.
And Hagel hasn't been sparing in his criticism of conservative and GOP figures, saying radio show hosts like Rush Limbaugh "try to rip everybody down" but "don't have any answers," and labeling George W. Bush as callous on Iraq when he was president.
Last week, 15 GOP senators sent a letter to Obama calling on him to withdraw Hagel's nomination.
Arizona Sen. John McCain, the ranking Republican on the Senate Armed Services Committee and a fierce Hagel critic, did not sign the letter. But he led the charge against him in the Senate, stalling the nomination at one point in exchange for more information from the White House on the deadly September terror attack on the U.S. diplomatic mission in Benghazi, Libya.
The real reasons why conservative groups are still going after Hagel
That sentiment gained traction in conservative circles.
"There is simply no way to sugar coat it. Senator 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," said Republican Sen. John Cornyn of Texas.
Vote no and send a message to Hagel
There was a healthy serving of politics behind the Hagel pushback, some experts say. He isn't the only potential member of Obama's first or second-term Cabinet to be grilled during the nomination process.
At the start of his first term, Obama's pick to lead the Treasury Department, Timothy Geithner, emerged from a tough confirmation fight in the wake of recession to help push through Wall Street reform as well as the banking and auto industry rescues. His successor, Jack Lew, is expected to be confirmed.
Some Republicans also believed that Hagel, like Susan Rice, was vulnerable in a divided political climate in Washington made more sharply partisan by Obama's re-election, according to experts.
Rice, the U.S. ambassador to the United Nations, withdrew her name from consideration for secretary of state after drawing heavy criticism from McCain and other Republicans over her public statements about the Benghazi attack.
Democratic supporters of Hagel came to his defense this week as the vote drew near.
"The president wants him in the room as he's making important decisions. There's no question about his integrity of character. I think the president deserves to have the Cabinet he wants as long as the person is qualified," Missouri Democratic Sen. Claire McCaskill said on "Fox News Sunday."
The consternation over Hagel's confirmation has been "kabuki theater," said David Rothkopf, editor of Foreign Policy magazine.
"The political divisions that dictated the pace and twists of his confirmation process pre-date him and will post-date his confirmation," Rothkopf said. "The reality is that Hagel won't drive (defense) policy, the president and Hill politics will."
And time will heal even these political wounds, Rothkopf said.
CNN's Kevin Liptak and Barbara Starr contributed to this report.