Washington (CNN) -- Former Sen. Chuck Hagel took on critics at his Senate confirmation hearing on Thursday to become President Barack Obama's next defense secretary, saying he may have been wrong at times in the past but always acted in the nation's best interests.
Facing tough questioning from conservatives, the decorated Vietnam veteran told the Senate Armed Services Committee that he fully supported Obama administration policies on ending combat operations in Afghanistan next year, preventing Iran from obtaining a nuclear weapon, and ending the ban on gays openly serving in the military.
However, Hagel stumbled at times and conceded toward the end of the seven hours of testimony that past statements on volatile issues such as the Middle East conflict and sanctions against Iran no longer applied or had been poorly expressed in the first place.
"If I had an opportunity to edit that, like many things I said, I would like to go back and change the words and meaning," Hagel responded at one point to a question about a 2003 comment in which he referred to Israel keeping people "like caged animals."
At another point at the contentious hearing, he referred to Iran as a legitimate state, causing Democratic Sen. Kirsten Gillibrand of New York to suggest he meant to say it was a recognized government.
"What I meant to say, should have said is - it is recognizable," Hagel said. "It has been recognized, is recognized at the United Nations. Most of our allies have embassies there. That is what I should have said and thank you."
He also appeared evasive early on when confronted by some former Senate colleagues who challenged his nomination because of what they characterized as shifting positions on confronting Iran, supporting Israel and maintaining a strong military amid pressure to cut costs.
Later in the day, Hagel sounded more certain in responding to the repeated challenges by conservatives over what newly elected Sen. Ted Cruz of Texas called his record of "antagonism" toward Israel.
Despite the campaign against him waged by conservatives, Hagel was expected to win confirmation to succeed Leon Panetta as Pentagon chief.
Other prominent political figures endorsed him, including former Sen. Sam Nunn, a conservative Democrat from Georgia and respected defense and nuclear policy expert, and former Sen. John Warner, a conservative Republican from Virginia, where the Pentagon is located and key military installations are based.
In his opening statement and in response to questions, Hagel defended his 12-year record as a Republican senator from Nebraska and what he called a consistent worldview on the role of the United States and its unparalleled military might.
"America has and must maintain the strongest military in the world; that we must lead the international community to confront threats and challenges together; and that we must use all tools of American power to protect our citizens and our interests," Hagel said, adding that the United States must engage the world.
Obama is reassembling his national security team at the start of his second term, turning to Vietnam War heroes for marquee positions: Hagel at defense and Sen. John Kerry to lead the State Department.
The next defense chief will wind down the war in Afghanistan and face fluid issues related to Iran and the civil war in Syria. Emerging terror hotspots in Africa and managing the Pentagon through budget uncertainty are other top priorities.
On specific issues at the hearing, Hagel said he was committed to Obama's goal of preventing Iran from obtaining a nuclear weapon.
"I've been on record on that issue. And as I've said in the past many times, all options must be on the table to achieve that goal. My policy is one of prevention, and not one of containment -- and the president has made clear that is the policy of our government," he said.
Armed Services Chairman Carl Levin, D-Michigan, told Hagel that "your reassurance to me in my office that you support the Obama administration's strong stance against Iran is significant."
However, the panel's top Republican, Sen. James Inhofe of Oklahoma, said he would oppose the nomination because of what he called Hagel's past support for policies that he said would appease U.S. enemies.
In particular, Inhofe cited Hagel's backing of direct talks with Iran, an enemy of Israel. Others challenged a Senate vote by Hagel years earlier to oppose unilateral U.S. sanctions against Iran, and a comment about the "Jewish lobby" in Washington that critics said hinted at anti-Israel sentiments.
Hagel, however, pledged continued support to help Israel's military prowess in the region. In response to repeated questions about his commitment to Israel, Hagel cited his Senate record of voting for every aid authorization or other measure supporting Israel.
"I think my record is pretty clear," he said.
In addition, Hagel said the United States was "not going to unilaterally disarm" when questioned about his ties to a group calling for eliminating nuclear weapons. If confirmed, he said, he would maintain "a modern, strong, safe, ready, and effective nuclear arsenal," adding that he was "committed to modernizing" it.
Regarding the possibility of impending budget cuts described by some as potentially devastating to Pentagon operations and the civilian economy it supports, Hagel said he would keep defense forces strong through efficient use of taxpayer dollars.
Asked later about the impact of the possible cuts, Hagel said that "the security of this country is not going to be in jeopardy." But he added that "if this happens, it's going to be a severe problem."
The military faces $500 billion in automatic spending cuts over the next decade absent congressional intervention in coming months to avert or soften them. This would come on top of steep budget reductions already in the pipeline.
If confirmed, Hagel will be the first defense secretary to have served all of his military career as an enlisted soldier. He was an Army sergeant in Vietnam, where he was wounded, and said on Thursday that his war experience was an influence in his life.
"I'm not shaped, framed, molded, consumed by that experience, but it's part of me," Hagel said, adding that he thought it would be a positive to have the defense secretary for the first time be someone "who understands the reality and consequences of war."
A sharp exchange on Thursday came when Sen. John McCain criticized Hagel's opposition to the troop surge in Iraq by the Bush administration and a similar move by Obama in Afghanistan. Both were crucial wartime decisions made by policymakers.
McCain, a former naval aviator and prisoner of war in Vietnam, said Hagel was wrong on both counts. The Arizona Republican said that he and Hagel, who once were close political allies and personal friends, had "fundamental differences" on important issues.
Hagel responded that his questioning of the surge strategy in Iraq was not an aberration.
"I always ask the question is this going to be worth the sacrifice because there will be sacrifice," Hagel said. "Now, was it required? Was it necessary? Senator McCain has his own opinion on that, shared by others. I am not sure. I am not that certain that it was required. It doesn't mean I am right."
Other Republicans on the panel complained that Hagel failed to turn over requested copies of past speeches and financial reports they requested, and he avoided directly answering some questions seeking to force him to declare that previous positions or comments were mistaken.
Hammered during questioning by Sen. Lindsey Graham, R-South Carolina, Hagel conceded that he never should have made the comment about the Jewish lobby.
Hagel had three major preparatory sessions for Thursday's hearing, according to an administration official involved in the confirmation process. The official said Hagel chose to "take the high road" by not responding with anger to "political theater."
However, another official acknowledged Hagel had some difficulty, saying "we think he's on his way, but he didn't round the bases today. He could have. He didn't."
A plurality of Americans back Hagel's nomination to succeed Panetta.
According to a CNN/ORC International poll conducted January 14-15 and released two weeks ago, 48% of the public said the Senate should confirm Hagel, with 22% saying no and three in 10 unsure.
CNN's Jessica Yellin, Adam Aigner-Treworgy, Paul Steinhauser and Gabriella Schwarz contributed to this story.