Outgoing US Defence Secretary Donald Rumsfeld remained defiant on the issue of Iraq in an emotional farewell meeting with Pentagon staff.
Mr Rumsfeld urged staying power on Iraq and Afghanistan
He warned an early exit from Iraq would be a "terrible mistake" and appealed for patience from the American people.
Mr Rumsfeld said his "worst day" in office was when he learned of abuses at Iraq's Abu Ghraib prison.
He resigned last month, after concern about Iraq led to bruising Republican losses in mid-term elections.
His last day in office is 17 December.
Addressing an audience of troops and Pentagon staffers, Mr Rumsfeld praised them for their dedication.
"I can't think of a more challenging period... in the 59-year history of this department than these past years," he said.
He praised the work of the military in Iraq and Afghanistan.
"Each of you and future generations of Americans, as well as future generations of Iraqis and Afghans, will be able to look on these past years as a time of enormous challenge and historic consequence," he said.
But he said patience and staying power were needed to succeed.
"To pull out precipitously (from Iraq) and inject that instability into the situation there in that country, and in that region, I think would be a terrible mistake."
He said he was "stunned" by the news of prisoner abuse at Abu Ghraib.
"Clearly, the worst day was Abu Ghraib, seeing what went on there and feeling so deeply sorry that that happened," he said in a question-and-answer session.
But he hit out at "grossly uninformed" charges in the media over the Guantanamo Bay detention camp.
When asked how he would like to be remembered, he quipped: "Better than the local press."
Former CIA director Robert Gates has been confirmed by the Senate as Mr Rumsfeld's replacement. He will be sworn in on 18 December.