THE deadly attack on the US consulate in the Libyan city of Benghazi was planned and "meticulously executed," the country's assembly chief said.

"I don't want to talk about what happened in other countries but as for Libya, the operation was meticulously executed," Mohammed al-Megaryef said of the wave of protests across the world over a US-produced film mocking Islam.

"There was planning. It was not a peaceful protest which degenerated into an armed attack or aggression. That's how it was planned," he said.

US ambassador Chris Stevens and three other Americans were killed on Tuesday when suspected Islamic militants fired on the consulate in the eastern Libyan city with rocket-propelled grenades and set it ablaze.

"The attack itself and the manner in which the attack occurred ...confirms that this was planned and programmed to achieve a purpose," Mr Megaryef said.