The attack on an American consulate building in Libya that left the ambassador and three other Americans dead may have been a planned operation by a group linked to al-Qaeda timed to coincide with the anniversary of the 9/11 terror attacks, sources in the US and Libya said Wednesday.

Sources in Libya told CNN that al-Qaeda operatives carried out the attack in revenge for a slain terrorist operative, using the release of an anti-Islam movie as a pretext for the chaos.

Protesters stormed the US Consulate in Benghazi late Tuesday night, setting fire to the building and killing Ambassador Chris Stevens as well as three other staffers.

The four were reportedly killed when fired at by a rocket-propelled grenade, part of a planned attack on the compound by two waves of gunmen.

US officials said some 50 Marines were being sent to Libya to reinforce security at US diplomatic facilities.

The Marines are members of an elite group known as a Fleet Antiterrorism Security Team, or FAST, whose role is to respond on short notice to terrorism threats and to reinforce security at embassies.

The Marines, sent from a base in Spain, were headed initially to the US Embassy in Tripoli, not to Benghazi, according to US officials, who spoke on the condition of anonymity because they were not authorized to talk to the press.

Officials also said the Pentagon decided to move two warships toward the Libyan coast.

Officials say one destroyer, the USS Laboon, moved to a position off the coast Wednesday, and the USS McFaul is en route and should be stationed off the coast within days. The officials say the ships, which carry Tomahawk missiles, do not have a specific mission. But they give commanders flexibility to respond to any mission ordered by the president.

According to Israel’s Channel 2 news analyst Ehud Yaari, the attack was planned to coincide with September 11, the anniversary of al-Qaeda’s attack on the US 11 years earlier, and was carried out in revenge for the killing of Abu Yahya al-Libi by US forces in June.

US officials say the Obama administration is also investigating whether it was a planned terrorist strike to mark the anniversary of 9/11. Intelligence officials said the attack on the Benghazi consulate was too coordinated or professional to be spontaneous, according to a US counterterrorism official who spoke on condition of anonymity because he was not authorized to discuss the incident publicly.

White House press secretary Jay Carney said it was too early to judge whether the attack was planned.

“I know that this is being investigated, and we’re working with the Libyan government to investigate the incident. I would not want to speculate on that at this time,” he said. Several Libyan security guards also were killed.

House Intelligence Committee Chairman Mike Rogers said US intelligence had not yet determined who was responsible, but added, “Our list is narrowing.”

“When you see (such an attack), it wasn’t some folks who had some guns in their garage and said let’s shoot up the consulate,” Rogers said in an interview Wednesday.

The FBI was sending evidence teams to Libya, said a law enforcement official.

Hours before the attack, al-Qaeda leader Ayman al-Zawahiri released a video confirming Libi’s death and calling for his blood to be avenged. Yaari added that Zawahiri’s brother Mohammed, recently released from an Egyptian prison, may have had a hand in planning the attack as well.

Details of how the Americans were killed were still being pieced together Wednesday. But according to Libyan Deputy Interior Minister Wanis al-Sharef’s account, two distinct attacks took place.

Al-Sharef said Stevens and a consultate staffer who had stayed behind in the building were killed in the initial attack on the consulate.

The rest of the staff successfully evacuated to another building nearby, preparing to move to Benghazi Airport after daybreak to fly to the capital, Tripoli, he said.

Hours after the storming of the consulate, a separate group of gunmen attacked the other building, opening fire on the more than 30 Americans and Libyans inside. Two more Americans were killed and 32 wounded – 14 Americans and 18 Libyans, he said.

Stevens was a career member of the US Foreign Service specializing in the Middle East, and served at various diplomatic posts around the region, including a stint as political section chief at the US Consulate in Jerusalem.

US sources told CNN that the attacks were pre-planned, but were unable to confirm whether the protest over the film, a low-budget affair that depicts the Muslim prophet Mohammad in a harsh light, was part of the attack, or whether the terrorists merely took advantage of it.

They added that Stevens was likely not specifically targeted.

According to the report, the Imprisoned Omar Abdul Rahman Brigades is suspected to be behind the attack. The little-known terror group, with links to al-Qaeda, has claimed responsibility for other attacks on international forces near Benghazi in the past.

In Cairo, some 200 Islamists staged a second day of protest outside the U.S. Embassy on Wednesday, but there were no more attempts to scale the embassy walls. After nightfall, the group dwindled and some protesters scuffled with police, who fired tear gas and dispersed them, emptying the streets.

 The AP contributed to this report.