President Barack Obama led the ceremony, recalling their lives in deeply personal terms and declaring the United States will never pull back on its principles or "retreat from the world."
"Their sacrifice will never be forgotten," Obama said as four flag-draped cases rested near him. He had come to witness the return of those slain in the assault on the American diplomatic mission, including the U.S. ambassador, Chris Stevens.
In the heat of a presidential election year, the scene was a gripping reminder of the danger facing Americans in diplomatic and military service every day, and of the turmoil in an incendiary region of the world that continues to test Obama's leadership.
Always in the background, campaign politics gave way to a sense of sheer loss. Secretary of State Hillary Rodham Clinton's voice broke as she spoke before the president, and she appeared to be fighting tears as she listened to him.
In addition to Stevens, the ceremony also honored three other Americans killed in Benghazi -- Sean Smith, an Air Force veteran who worked as an information management specialist for the State Department; Glen A. Doherty, a former Navy SEAL who worked for a private security firm and was protecting the consulate in Benghazi; and Tyrone S. Woods, also a former Navy SEAL who had served protective duty in various U.S. posts.
"They knew the danger, and they accepted it," Obama said. "They didn't simply embrace the American ideal. They lived it."
The ceremony recalled one 14 years ago, when President Bill Clinton led a ceremony at Andrews for the return of remains of 10 Americans killed in a bombing in Nairobi.
The presidential election, however, did not recede for the day. Less than two hours after the ceremony, Obama took his motorcade on an unscheduled trip to the Democratic Party headquarters to hold political meetings. In the evening, he planned to attend a previously arranged fundraiser in Washington.
The transfer of remains came three days after an attack on the consulate, one of a series of assaults on U.S. outposts in Muslim countries that U.S. officials blame on an anti-Muslim video made in the United States.
Clinton said the rage and violence aimed at American missions was prompted by "an awful Internet video that we had nothing to do with."
The president met privately with family members of the fallen before stepping into a cavernous hangar at this base he knows well, home to Air Force One. Emerging from a C-17 cargo plane, six Marines each carried the cases on top of stands before four waiting hearses, as a color guard led the somber procession. When the funeral hymn stopped, a deep silence took over, interrupted only by the quiet steps of the Marines.
Clinton and Obama both spoke of how the four men lived their lives -- and how their mission would go on.
"This work, and the men and women who risk their lives to do it, are at the heart of what makes America great and good," Clinton said. "So we will wipe away our tears, stiffen our spines, and face the future undaunted."
Said Obama: "The United States of America will never retreat from the world. We will never stop working for the dignity and freedom that every person deserves."
Also attending the ceremony were Vice President Joe Biden and Secretary of Defense Leon Panetta.
The searing images of burning flags, breached embassies and smoldering cars have shocked the nation.
The deaths on Tuesday, the anniversary of the Sept. 11, 2001 terrorist attacks, and the anti-American sentiment behind them underscored a foreign policy paradox for Obama. Many of the protests in the Arab world were in countries that underwent Obama-backed revolutions during the Arab Spring.
"The people Egypt, Libya, Yemen and Tunisia did not trade the tyranny of a dictator for the tyranny of the mob," Clinton said. "Reasonable people and responsible leaders in these countries need to do everything they can to restore security and hold accountable those behind these violent acts."
Illustrating the volatility, Friday's ceremony unfolded as a Marine rapid response team arrived in Yemen's capital as protests erupted there.