WASHINGTON — The United States condemned an attack on its diplomatic mission in the Libyan city of Benghazi, amid reports it had been set on fire and targeted with rocket-propelled grenades.

"We can confirm that our office in Benghazi, Libya has been attacked by a group of militants," State Department spokeswoman Victoria Nuland said Tuesday.

"We condemn in strongest terms this attack on our diplomatic mission," she added in a statement issued before reports that one American had been killed in the attack, which came on the 11th anniversary of the 9/11 attacks.

US officials were working with the Libyans to secure the compound, Nuland said, adding that an earlier protest against the US embassy in Cairo, in which demonstrators scaled the walls, had now ended.

Abdelmonoem al-Horr, a spokesman for the Libyan interior ministry's security commission, said the grenades were fired from a nearby farm at the building.

Security forces and the interior ministry were trying to contain the situation, he added. Deputy interior minister Wanis al-Sharif said one American official had been killed and another was wounded.

"In Cairo, we can confirm that Egyptian police have now removed the demonstrators who had entered our embassy grounds earlier today," Nuland said.

Protesters in both cities were said to be demonstrating against a film which they said had offended Islam.

But officials said it remained unclear whether the two protests in Benghazi and Cairo had been coordinated or whether they were linked.

"We cannot confirm any connection between these incidents," said a senior State Department official, asking to remain anonymous.