By JEREMY W. PETERS

February 26, 2013

WASHINGTON — The Senate confirmed Chuck Hagel as defense secretary on Tuesday after he survived a bruising struggle with Republicans. At the same time,President Obama’s nominee to be Treasury secretary moved closer to approval with bipartisan support, suggesting that the Republican blockade against the administration’s second-term nominees was beginning to ease.

After escaping a filibuster from members of his own party, Mr. Hagel, a former Republican senator from Nebraska, prevailed in a 58-to-41 vote — the smallest margin for a defense secretary since the position was created in 1947, according to Senate records. Fifty-two Democrats, two independents and four Republicans backed Mr. Hagel, and 41 Republicans opposed him.

The narrow victory raised questions about whether Mr. Hagel would arrive at the Pentagon as a diminished leader as it faces deep budget cuts that are set to take effect on Friday.

The Run-Up

The podcast that makes sense of the most delirious stretch of the 2016 campaign.

Hours before the final vote on Mr. Hagel, the Senate Finance Committee approved the nomination of Jacob J. Lewas Treasury secretary on a 19-to-5 vote. Attention is now turning to the coming vote by the Senate Intelligence Committee on the president’s nominee as C.I.A. director, John O. Brennan.

The chances for Mr. Brennan remained good, though his confirmation was not expected to be entirely smooth, as both Republicans and Democrats have raised objections over the agency’s use of drones to kill terrorism suspects. Republicans also see the Brennan vote, like the fight over Mr. Hagel, as leverage to press other issues with the White House.

Senator Ron Wyden, Democrat of Oregon, said on Tuesday that he favored a longer confirmation process to force the White House to disclose more about the drone program. “There’s an old saw that after somebody is confirmed, they don’t even owe you a holiday card,” he said. “This is the time for vigilant oversight.”

Senator Rand Paul, Republican of Kentucky, has called for similar disclosures on drones and has threatened to use “every procedural option at my disposal” to hold back Mr. Brennan’s nomination.

Chuck Hagel

Christopher Gregory / The New York Times

Senators John McCainof Arizona and Lindsey Graham of South Carolina, both Republicans, have threatened to delay the nomination over another issue altogether: the attack last year on the American diplomatic mission in Benghazi, Libya. Both men made similar demands for information during the confirmation of Mr. Hagel, who, unlike Mr. Brennan, has had no role in formulating the Obama administration’s defense and national security policies.

Even if these efforts serve only to inconvenience the White House and cause the president and his nominees some mild political damage, Republicans say they are satisfied that they are forcing the confirmation process to be more deliberative.

“Probably the best-known power of the United States Senate is advise and consent,” said Senator Lamar Alexander, Republican of Tennessee. “Movies have been made about it, books have been written about it. It’s what we do. And we’d be derelict in our duty if we didn’t examine the qualification of our president’s cabinet.”

But Democrats said the process, particularly with Mr. Hagel, had hardly been reflective, let alone worthy of the Senate.

Senator Barbara Mikulski, Democrat of Maryland, allowed that her Republican colleagues were entitled to ask questions. “But I understand that Jack Lew had 638 questions that he had to answer from one senator,” she said. “Now, really? If you don’t want the guy or gal, vote against them. But don’t drag it out. That’s not politics, that’s petulance.”

Republicans in the Senate, joined by an array of conservative activists, waged an all-out campaign to discredit Mr. Hagel, digging into his financial records for evidence that he was paid by anti-American groups and scouring his old speeches for signs that he was hostile to Israel. Those efforts produced little, forcing Republicans to acquiesce after filibustering his nomination in an initial vote this month.

But even before Mr. Hagel takes office, questions are growing about whether the fight will wound his ability to lead the Pentagon at a time of upheaval both at home and overseas. With a series of huge budget cuts known as sequestration set to go into effect — cuts that will fall hard on the Defense Department if Congress cannot negotiate a compromise — Mr. Hagel will inherit myriad challenges.

The four Republican senators who voted for his confirmation were Thad Cochranof Mississippi, Mike Johanns of Nebraska, Mr. Paul and Richard Shelby of Alabama.

Senator Mitch McConnell, Republican of Kentucky, on Tuesday. The margin of Mr. Hagel’s confirmation was the smallest for a defense secretary, records showed.

Christopher Gregory / The New York Times

Asked at a Defense Department news conference on Tuesday whether Mr. Hagel could still be effective despite the difficult confirmation process, George Little, the Pentagon press secretary, was unambiguous: “Absolutely.”

“He has spent much of his life in the halls of the United States Congress,” Mr. Little said. “He understands the importance of a healthy debate.”

Privately, even some Democrats said they were concerned. One Congressional official, speaking on the condition of anonymity, said it was alarming that Mr. Hagel was not confirmed with the broad bipartisan support that the Senate usually extends to nominees for defense secretary.

“This is unprecedented territory,” the official said. “He is not just weakened with Republicans. Just think about the Democrats who put their neck out for a Republican nominee for defense secretary. You think it was easy keeping all those Democrats on board? No.”

Nearly all recent defense secretaries have sailed through their final votes, usually receiving just one or two “no” votes. The exception was John G. Tower, the nominee of President George Bush, defeated in a 47-to-53 floor vote in 1989 amid allegations of alcohol abuse and womanizing.

Mr. Hagel was the only nominee for defense secretary to face a filibuster, which Republicans achieved a week and a half ago. On Tuesday, 18 Republicans joined Democrats in voting to cut off debate, while 27 voted to continue the filibuster.

As ugly as the clash over Mr. Hagel became, there were some indications that Republicans were moving on. The vote on Tuesday brought to a close an unusually contentious nomination fight, one that surprised many in Washington for how personal and bitter it became, considering that Mr. Hagel worked alongside many of his antagonists until just four years ago.

One of those senators, Mr. Shelby, who initially supported the filibuster, said, “I wish him well.”