President Obama surprised outgoing Defense Secretary Robert Gates with the Presidential Medal of Freedom — the highest civilian honor the president can bestow — at a ceremony Thursday marking the Pentagon chief's last day on the job.
"I can think of no better way to express the gratitude of the nation to Bob Gates than with a very special recognition," Obama said as he asked Gates to step forward to receive the award.
An emotional Gates quipped that he "should have known the president was getting pretty good at this covert ops stuff," an apparent reference to last month's secret raid in Pakistan that killed terrorist leader Osama bin Laden.
Gates said his four-and-a-half years as defense secretary, a period in which he oversaw the Iraq and Afghanistan wars and recent U.S. military involvement in Libya, "has been the greatest honor and privilege of my life, and for that I will always be grateful."
Gates is the only person to hold the job under two presidents from different parties: Republican George W. Bush and Democrat Obama. He thanked both men Thursday.
During the Pentagon ceremony, Obama lauded Gates for his years of service and for improving security for troops in the field, modernizing care for veterans and cutting unnecessary spending in the Defense Department.
"Bob Gates made it his mission to make sure this department is serving our troops in the field as well as it serves us," the president said of the man he called a humble American patriot, a man of common sense and decency, and one of the nation's finest public servants.
Gates, who became defense secretary in December 2006 under Bush, is being replaced by outgoing CIA Director Leon Panetta. In turn, Panetta will likely be replaced at the CIA by Gen. David Petraeus, pending Senate confirmation.
Gates plans to move back to his lakeside home in Washington state, where he'll write a book about his time leading the U.S. military, which is likely to include at least a few chapters on the war in Iraq.
NPR's Kimberly Adams and Rachel Martin reported from Washington, D.C., for this story, which contains material from The Associated Press.