President Obama vowed  the US would ‘‘work with the Libyan government to bring to justice’’ those who killed the Americans in Libya.