With the flag-draped coffins of four Americans killed during an attack on the US Consulate in Libya behind him, a solemn President Barack Obama hailed their service, pledging to honour their memory and not "retreat from the world".

At a formal ceremony in a hangar at Andrews Air Force Base, Obama and Secretary of State Hillary Clinton paid their respects to the four men as their remains were returned.

Clinton described Ambassador Christopher Stevens' "goofy but contagious" smile, and his outsized courage. "He risked his life to help protect the Libyan people from a tyrant," she said, "and gave his life helping them build a better country."

Obama called all four men - Stevens; Sean Smith, a foreign service officer; and two former Navy SEALs, Tyrone Woods and Glen Doherty - patriots who loved their country, "chose to serve it and served it well".


"They had a mission, and they believed in it," Obama said. "They knew the danger and they accepted it. They didn't simply embrace the American ideal, they lived it, they embodied it: the courage, the hope and, yes, the idealism. That fundamental American belief that we can leave this world a little better than before. That's who they were, and that's who we are. If we want to truly honour their memory, it's who we must always be."

Obama, who met with the families of the four men before the ceremony, repeated a vow to see that the perpetrators of the attack are brought to justice.

Clinton, too, argued for continued involvement, saying: "There will be more difficult days ahead, but it is important that we don't lose sight of the fundamental fact that America must keep leading the world. We owe it to those four men to continue the long, hard work of diplomacy."

And she called on leaders in those countries to do "everything they can to restore security and hold accountable those behind these violent acts."

"The people of Egypt, Libya, Yemen and Tunisia did not trade the tyranny of a dictator for the tyranny of a mob," she said.