Updated

Al Qaeda militants attacked the U.S. consulate in Istanbul on Wednesday, killing six people, according to a police official who spoke on condition of anonymity because he was not authorized to brief journalists.

Wielding pistols and shotguns, the attackers struck a police guard post outside the consulate, sparking a gunbattle that left three attackers and three officers dead.

• Click here to view photos.

"It is an obvious act of terrorism," U.S. Ambassador Ross Wilson said in a statement.

The U.S. ambassador to Turkey and Turkey's foreign ministry said security around all American diplomatic missions in Turkey had been increased.

Click here to view video.

Yavuz Erkut Yuksel, a bystander, told a television station the attackers emerged from a vehicle and surprised the guard.

"One of them approached a policeman while hiding his gun and shot him in the head," Yuksel said.

Footage from a security camera at the site showed four armed and bearded men emerging from a car and killing a traffic policeman, then running toward a guard post some 50 yards away as other policemen fired back, the Dogan news agency reported.

The shootout caused panic and scattered people who were waiting in a line for visas. U.S. security personnel went inside the compound because they are not authorized to engage in armed action on Turkish soil, Dogan said.

A fourth policeman and the driver of a towing vehicle were wounded in the attack, Istanbul Gov. Muammer Guler said.

Wilson said the consul general in Istanbul, Sharon Wiener, told him that that consulate staff were "safe and accounted for."

"Our countries will stand together and confront this, as we have in the past," he continued.

Secretary of State Condoleezza Rice said Wednesday that she did not know who was responsible and for the attack and she would soon talk with Turkey's foreign minister.

"Obviously first of all the United States deeply regrets the loss of life and condolences go out to the families of those who were killed," Rice said as she traveled to Tbilisi, Georgia. "I know that some policemen were among those who died and we very much appreciate what was clearly a very rapid and proper response from the government to try to deal with the security situation in front of our consulate."

At least two of the attackers were Turkish nationals, Guler said. Police said they were pursuing at least one attacker who escaped in a car after the attack outside the high-walled consulate compound in the residential Istinye district around 11 a.m.

NTV television, citing police sources, said officials feared the car might be loaded with explosives. Police would not confirm that report.

Interior Minister Besir Atalay said at the scene that there had been no claim of responsibility and police would not reveal the identities of the attackers and their possible affiliations for the sake of the investigation.

Television footage showed four people lying on the ground at the foot of the consulate's wall before officials removed the bodies.

"The Turkish police responded quickly and effectively. We are deeply grateful for the work that they do to protect our official U.S. government establishments here," Wilson said. "It is, of course, inappropriate now to speculate on who may have done this or why. It is an obvious act of terrorism. Our countries will stand together and confront this, as we have in the past."

The secure U.S. consulate building was built after homegrown Islamic militants linked to Al Qaeda carried out homicide bombings in 2003 that targeted two synagogues, the British Consulate and a British bank in Istanbul. Those attacks killed 58 people.

"There is no doubt that this is a terrorist attack," said Guler, who described the three slain policemen as "martyred."

The shooting coincided with the visit to Istanbul of top American officials involved in the fight against illegal drugs. Michele Leonhart, acting administrator of the U.S. Drug Enforcement Administration and Scott Burns, deputy director of the White House Office of National Drug Control Policy, were attending an anti-drug conference in another part of Istanbul Wednesday morning. It was not clear if they had planned to visit the consulate but visiting U.S. delegations almost always visit diplomatic missions.

Istanbul prosecutor Aykut Cengiz Engin said the attackers were armed with pistols and shotguns. Forensic teams were seen examining a shotgun on the ground.

The consulate occupies an imposing structure on a hill in Istinye, a densely residential neighborhood along the Bosporus Strait on the European side of Istanbul.

A reporter for The Associated Press who visited the consulate last week drove unimpeded past an entrance for the public and parked on a residential street two blocks away. The area directly in front of the entrance was kept clear of vehicles.

Several guards stood in separate locations outside the entrance, but weapons were not on display; Turkish civilians seeking visas and other documents sat at cafes across the street.

The Associated Press contributed to this report.