BBC News readers have been e-mailing accounts of what they saw and heard of the attack on the US consulate in the Saudi city of Jeddah.
Image sent by reader Mohammad Amir of locals at scene of attack
Reader Mohammad Amir said the attack appeared to have been carried out by the main gate on the southern side of the US consulate complex.
"A lot of smoke is still coming out from the complex's main gate and choppers are hovering over the area," he wrote.
He said the gunfire appeared to have stopped, however crowds of people had gathered by the western side of the complex and police had cordoned off the immediate area.
Yahya Hamidaddin also said that helicopters were circling the building. Sporadic bursts of gunfire from Saudi security forces had been heard at irregular intervals while police cars and at least two ambulances could be seen in front of the consulate, he added.
Many readers working close to the consulate - which is on one of Jeddah's busiest streets - said they did not hear any explosion and became aware of the attack only after they saw heavy plumes of smoke rising from the area.
"Somebody had told us that there was an attack on the consulate, so we went to the top floor of our building and saw huge plumes of smoke and helicopters circulating the spot," said reader Shaiju Thomas.
"All the roads around were blocked and people could not get out for lunch."
Ahmad Badr said the noise was deafening as helicopters ferried soldiers to the scene and police diverted traffic from the vicinity.
"My wife is working in a research company based in a residential compound close to the consulate," he said.
"They have been confined to the premises of the compound by Saudi security forces. Sirens and helicopters can be heard all over the place."
Rohit Kumar e-mailed to say he had a friend in the consulate building.
"I called him earlier and he sounded scared and under pressure," he wrote.
"He told me to put down the phone."
Many locals and expat workers in the area e-mailed in to express surprise that the consulate had been targeted, with one expat describing the complex as "virtually impregnable".
The area is apparently well guarded, with heavy concrete buffers placed in front of the building and guards armed with machine-guns patrolling outside.
"There is an armoured car with a machine-gun turret at the main entrance and several outlying machine-gun posts. I am amazed that anyone was able to get in," wrote reader Robert M Woodruff, who lives less than a mile from the area.
"The security at Jeddah's consulate is so tight since the last year or more," added Saud in Jeddah.
"It is impossible for anyone to reach the area easily."