The fleeing gunmen led police on a chase through the northwest Saudi city of Yanbu, exchanging fire outside a Holiday Inn before police caught up with them in a downtown shootout, a witness said. The Interior Ministry said three attackers were killed and one was captured.
There was no immediate word on who was behind the shooting, but U.S. officials had, an important U.S. ally.
CBS News Corrrespondent Mark Phillips said the attack appeared to be "another calculated attempt to destabalize the Saudi regime."
The attack began at offices just outside a petrochemical plant co-owned by Exxon Mobil and the Saudi company SABIC.
"Four individuals entered the offices of a Saudi contractor and randomly shot at Saudi and foreign employees," the Interior Ministry said in a statement.
The attackers tied the body of one of their victims to the back of their car and dragged it down the street, according to a witness who spoke only on condition of anonymity.
The assailants fled into residential neighborhoods of Yanbu, 550 miles west of Riyadh, and commandeered cars, "but security forces were able to kill three of them and injure and capture the fourth," the ministry said.
A witness, who spoke only on condition of anonymity, said a gun battle erupted during the chase outside the Holiday Inn hotel, and that the gunmen fled to downtown Yanbu before police caught up with them.
Saudi Arabia's ambassador to Britain, Prince Turki al-Faisal, offered condolences to the families of those killed.
"We will not be discouraged by this brutal incident in which innocent lives were lost - British, American and Australian as well as Saudi Arabian - and many people injured in an indiscriminate evil rampage," Prince Turki said in London.
British Foreign Minister Jack Straw said he was "shocked and sickened by this act of terrorism."
"We cannot let the terrorists succeed," he said. "Saudi authorities have our full support and are working hard to tackle terrorism. We stand ready to offer assistance."
Two Americans were killed, the U.S. State Department said. ABB-Lummus, the energy arm of multinational engineering company ABB, said both were engineers for the company. A British ABB employee, a British contractor and an Australian employee were also killed, spokesman Bjorn Edlund said from Zurich, Switzerland.
A European diplomat said a second Australian also was killed in the attack, but had no further details.
Two American ABB-Lummus employees were wounded in the attack, one critically, Edlund said. He wasn't sure how many others were wounded. Edlund said ABB employs hundreds of expatriates in Saudi Arabia and more than 50 Americans in Yanbu alone.
"It is obviously an enormous blow. Losing five employees in a terrorist attack is a terrible, terrible thing to happen," Edlund said. "We are trying to deal with it as best as we can."
A spokeswoman from Australia's Department of Foreign Affairs and Trade identified one of the Australians killed in the attack as Anthony Richard Mason, 57, from the state of Western Australia.
European diplomats, who confirmed the six Westerners had died, also said a member of the Saudi national guard was killed. A Saudi police captain was seriously wounded, the diplomats said on condition of anonymity. A Canadian diplomat in Riyadh said two Canadian citizens also were hospitalized, but the diplomat had no details on their condition.
Saudi TV footage showed one victim lying in the bloody front seat of a sport utility vehicle, his leg dangling out an open door with a rifle nearby and several bullets on the floor. His identity was not immediately known, but he appeared to be wearing a security officer's uniform.
In Irving, Texas, Exxon Mobil spokesman Tom Cirigliano said the attack occurred just outside his company's facility. He said the facility wasn't damaged and no Exxon Mobil employees were hurt.
"We abhor any violent attacks like this," he said.
In another, near-simultaneous attack in the city, a pipe bomb was thrown over a wall of Yanbu International School, causing minor damage and slightly injuring the school's custodian, according to the Overseas Security Advisory Council, which shares security information between the U.S. government and the private sector. No children were at the school, the OSAC said.
Saudi Arabia relies heavily on 6 million expatriate workers, including about 30,000 Americans, to run its oil industry and other sectors.
, when eight Americans were among 34 people killed in a series of coordinated suicide bombings in the capital, Riyadh. That attack and on a housing compound that killed 17 people were blamed on the al Qaeda terror network.
Last month, the United States ordered the departure of nonessential U.S. government employees and family members from Saudi Arabia and also urged private citizens to depart. The embassy had warned of "credible indications of terrorist threats aimed at American and Western interests in Saudi Arabia."
The U.S. Embassy official said the U.S. consulate in the Red Sea port city of Jiddah was following up the issue with Saudi authorities. Yanbu is about 220 miles northwest of Jiddah, also on the Red Sea.
"We are working with authorities to determine the facts," State Department spokeswoman Susan Pittman said from Washington.
A Yanbu resident said by telephone that police had set up checkpoints throughout the city, and that some of the Westerners involved in the oil industry in Yanbu were unable to reach their workplaces because of the heavy police presence.
The May 2003 housing compound attack was seen as a wake-up call to Saudis of the dangers of Islamic militants at home. Al Qaeda leader Osama bin Laden was born and raised in the kingdom, but expelled in 1994 for agitating against the monarchy.
Saudi security forces have been hunting Islamic militants, resulting in frequent deadly clashes in recent months.
An American was also killed in a May 1, 2003, shooting attack at the King Abdul Aziz Naval base in Jubail, about 250 miles northeast of Riyadh. Few details about that shooting were released. The attacker, who was dressed in a Saudi navy uniform, escaped.