Libyan Deputy Prime Minister Mustafa Abu Shagour confirmed on Wednesday that the U.S. ambassador to Libya, Christopher Stevens, was killed in an attack in Libya.

"I do condemn the cowardly act of attacking the U.S. consulate and the killing of Mr Stevens and the other diplomats," Abu Shagur wrote on Twitter.

Stevens and three other embassy staff were killed in a rocket attack on Tuesday night that targeted his car in the eastern Libyan city of Benghazi, a Libyan official had told Reuters.

Meanwhile, Al Arabiya reported on Wednesday that Stevens died of suffocation during the attack on the consulate in Benghazi, citing Interior Ministry sources.

The attack in Libya came hours after ultraconservative Islamist demonstrators in Egypt climbed the walls of the U.S. Embassy in Cairo to protest a film being produced by Egyptian Coptic Christians living in the U.S.

An Israeli filmmaker, responsible for the movie attacking Islam's Prophet Muhammad that sparked the angry assaults, went into hiding on Tuesday.

Speaking by phone from an undisclosed location, writer and director Sam Bacile remained defiant, saying Islam is a cancer and that he intended his film to be a provocative political statement condemning the religion.