WASHINGTON — Leon E. Panetta was confirmed unanimously by the Senate on Tuesday as the new secretary of defense, placing him in charge of the final stage of the withdrawal in Iraq and the Obama administration’s military policy in Afghanistan.

The 100-to-0 vote in favor of Mr. Panetta, a former House member and White House official who most recently served as director of the Central Intelligence Agency, showed strong Congressional confidence in his ability to hold what lawmakers described as one of the most demanding jobs in the capital.

“Leon Panetta heading up the Department of Defense is just a home-run choice,” said Senator Lindsey Graham, Republican of South Carolina, noting that the strong backing for Mr. Panetta was a rare bipartisan moment.

Mr. Panetta, a native of Monterey, Calif., will succeed Robert M. Gates, a holdover from the Bush administration who is also held in high regard by members of both parties on Capitol Hill.

Mr. Panetta, who turns 73 next week, has been a Washington fixture since the late 1960s. He was budget director and chief of staff to President Bill Clinton after serving as the Budget Committee chairman in the House. He was director of the Office of Civil Rights in the Nixon administration and joined the Democratic Party in the early 1970s.

“For over four decades, Leon Panetta has been an extraordinary public servant spanning several administrations,” said Senator Kirsten E. Gillibrand, Democrat of New York. She added that Mr. Panetta had “played an instrumental role in the successful mission to bring Osama bin Laden to justice.”

As the new Pentagon chief, Mr. Panetta will also be responsible for handling the end of the military policy banning gay men, lesbians and bisexuals from serving openly. And he will be taking over as some lawmakers are raising questions about American participation in the operations against the government in Libya.

“Mr. Panetta boldly led the C.I.A. at a crucial time in its history, restored C.I.A. officers’ morale after years of difficult challenges and strengthened the agency and our national security,” said Senator John D. Rockefeller IV, Democrat of West Virginia and a former head of the Intelligence Committee. “His experiences, perspectives and management skills have prepared Mr. Panetta to tackle the security and budgetary challenges that we face.”

Photo
Leon Panetta appears before the Senate Armed Services Committee hearing on his nomination to be secretary of defense. Credit Michael Reynolds/European Pressphoto Agency