The US ambassador to Libya, Christopher Stevens, has died from smoke inhalation in an attack on the US consulate in the eastern Libyan city of Benghazi, the country's interior ministry and security sources have said.
An armed mob attacked and set fire to the building in a protest against an amateur film deemed offensive to Islam's Prophet Muhammad, after similar protests in Egypt's capital.
The ambassador was paying a short visit to the city when the consulate came under attack on Tuesday night, Al Jazeera's Suleiman El-Dressi reported from Benghazi.
He died of suffocation during the attack, along with two US security personnel who were accompanying him, security sources told Al Jazeera. Another consulate employee, whose nationality could not immediately be confirmed, was also killed.
Two other staff were injured, El-Dressi reported. The deaths were confirmed by Wanis al-Sharif, the Libyan deputy interior minister, to the AFP news agency.
Addressing a press conference, Sharif blamed loyalists of former Libyan ruler Muammar Gaddafi for the attack, while stressing that the US should have removed its personnel from the country when news of the film's release broke.
"They are to blame simply for not withdrawing their personnel from the premises, despite the fact that there was a similar incident when [al-Qaeda second-in-command and Libyan citizen] Abu Yahya al-Libi was killed. It was necessary that they take precauations. It was their fault that they did not take the necessary precautions," he said.
Sharif said that those who attacked the consulate were more heavily armed that the Libyan security services tasked with protecting the embassy.
Mustafa Abu Shagur, the Libyan deputy prime minister, condemned the "cowardly act of attacking the US consulate and the killing of [the ambassador] and the other diplomats".
Abdel Moneim al-Yasser, a member of the interim committee monitoring security in Libya, told Al Jazeera: "A handful of renegades of people who are attacking the national interests of Libya are behind this issue. We are still investigating on their identity [...] we will track them and bring them to justice."
The bodies of the dead were transported to the Benghazi international airport, to be flown to Tripoli and then onwards to a major US airbase in Germany.
Abdel Moneim al-Hurr, a spokesman for Libya's Supreme Security Committee, said on Wednesday that rocket-propelled grenades had been fired at the consulate from a nearby farm.
"There [were] fierce clashes between the Libyan army and an armed militia outside the US consulate," he said. He also said roads had been closed off and security forces surrounded the building.
A group calling themselves the "Islamic law supporters" carried out the attack in response to the relaese of the film, Al Jazeera's El-Dressi reported.
A small group of men was trying to extinguish the flames and three security men briefly surveyed the scene. Some blood stains could also be seen in front of one of the buildings. Three cars were torched.
Stevens, a career member of the US foreign service, arrived in Tripoli to take up the post of ambassador in May 2012, having previously served twice previously in Libya. He had also served as the US government's representative to the Libyan National Transitional Council (NTC) during the 2011 uprising against the government of Muammar Gaddafi.