TRIPOLI, Libya (AP) — Libya's interim president has apologized to the United States for the attack on the U.S. consulate in the eastern city of Benghazi that killed the American ambassador and three of his staff.

Mohammed el-Megarif described the attack as "cowardly" and offered his condolences on the death of Ambassador Chris Stevens and the three other Americans. Speaking to reporters, he vowed to bring the culprits to justice and maintain his country's close relations with the United States. He said the three Americans were security guards.

The attack on the Benghazi consulate was carried out by protesters angry over a film that ridiculed Islam's Prophet Muhammad. They used machine guns and rocket propelled grenades.

"We extend our apology to America, the American people and the whole world," el-Megarif said.