Updated

Helicopter-borne Saudi commandos drove Al Qaeda (search) militants from an expatriate housing complex in the kingdom's oil hub Sunday, ending a shooting and hostage-taking spree that left 22 dead — most of them foreigners.

Police were hunting for three assailants believed to have escaped after the attack, the worst terrorist act on Saudi soil in a year and the second this month to target its oil industry. At least one American was killed in the attack.

A statement Sunday attributed to Al Qaeda's chief in the Saudi region said the violence aimed to punish the kingdom for its oil dealings with the United States and to drive "crusaders" from "the land of Islam."

The 25-hour rampage started Saturday morning when militants dressed in military-style uniforms opened fire inside two oil industry office compounds in the Gulf city of Khobar (search) and engaged in a shootout with Saudi guards. They then moved up the street to the Oasis, an upscale resort and residence with apartments, villas and hotels, where they took 45-60 hostages and apparently began executing them.

Saudi security stormed the building early Sunday morning after they found out that the hostages were being harmed, said Jamal Khashoggi, an adviser to Saudi Arabia's embassy in London.

"Intervention then became necessary," he said.

The commandos freed 41 hostages, the Saudi Interior Ministry said. The Saudi ambassador to Britain, Turki al-Faisal, told the BBC that the bodies of nine hostages had been found on the premises when forces went in.

The Interior Ministry said it arrested one militant, the ringleader of the assault. One of the fugitives also was wounded.

In Washington, a spokesman for the Saudi Embassy, Nail al-Jubeir, said in a televised interview that one militant also was killed in the standoff.

"The intent (of the attack) was to cripple the world economy by sending the message that foreigners are not safe inside Saudi Arabia," he said, but dismissed any notion that the kingdom cannot protect its people.

"It does not take much to come into a building with a rifle and shoot innocent people," he said, comparing the attack to a drive-by shooting. "Unfortunately it is very difficult to guard against."

The attack marks a fresh challenge to efforts by the kingdom to crack down on Islamic militants. There also were concerns the attack could drive up oil prices, already at new highs in part because of fears the world's largest oil producer is unable to protect itself from terrorism.

The U.S. Embassy in Saudi Arabia (search) reiterated a call to its citizens to leave the kingdom. Britain's Foreign Office said on its Web site that it fears further terror attacks "may be in the final stages of preparation" in Saudi Arabia and warned against all but essential travel.

A suspected Al Qaeda attack on May 12, 2003, hit three Riyadh (search) compounds housing foreigners, killing 26 victims. The most recent terror attack targeted the offices of Houston-based ABB Lummus Global Inc. in the western city of Yanbu on May 1, killing six Westerners and a Saudi.

Most of the dead from Saturday's attack were among the 6 million expatriate workers the kingdom relies on to run its oil industry and other sectors. They included: eight Indians, three Filipinos, three Saudis, two Sri Lankans, an American, a Briton, an Italian, a Swede, a South African and a 10-year-old Egyptian boy, according to the Interior Ministry statement read on Saudi television.

It said 25 people of different nationalities were injured and that security forces had evacuated 242 people from the Oasis, including residents not held hostage but trapped inside.

It was not clear how many people were killed in the initial shooting rampage or during the hostage standoff. On Saturday night, while the hostages were being held, Crown Prince Abdullah (search) said about 10 Saudis and foreigners had been killed at the oil company offices.

In its statement, the Interior Ministry said the militants tried to enter the Oasis complex with a vehicle rigged with explosives, but had to scale the wall instead.

Once inside, they gathered hostages on the sixth floor of a high-rise building after making sure they were targeting non-Muslims, residents said. Militants have been criticized in the Arab world for previous attacks in which Saudis and other Arabs were killed.

Abdul Salam al-Hakawati, a 38-year-old Lebanese corporate financial officer, said gunmen rummaging around his family residence said declared, "This is a Muslim house" — apparently seeing framed Quranic verses on the walls.

He said a man in his early 20s, carrying a machine gun and wearing an ammunition belt, told him: "We only want to hurt Westerners and Americans. Can you tell us where we can find them here?"

Late Saturday, Saudi security forces stormed the walled complex and surrounded the attackers. Those forces tried to reach the hostages during the night, they said, but found booby traps.

Just after sunrise, three helicopters dropped Saudi commandos into the compound. Gunfire, heard sporadically overnight, rang out again. Within a few hours, the standoff was over.

In the audio statement posted Sunday on Islamic Web sites, the speaker identified as Abdulaziz Issa Abdul-Mohsin al-Moqrin — believed to be Al Qaeda's chief in the Saudi region — claimed responsibility for the attack. The CIA was reviewing the recording to determine its authenticity.

The speaker railed against the Saudi government, accusing it of opening the country to Americans and providing "America with oil at the cheapest prices according to their masters' wish, so that their economy does not collapse."

The speaker also said the struggle with America would be pursued "in the Arabian peninsula, Afghanistan, in Iraq" and that the battle with the Saudi government will continue until the "crusaders are expelled from the land of Islam."

It was not possible to verify the authenticity of the claim, which was accompanied on the site by a written statement characterized by contempt for non-Muslims and signed "Al Qaeda's cell in the Arabian Peninsula."

Al Qaeda chief Usama bin Laden, blamed for past terror attacks in Saudi Arabia, has vowed to destabilize the Saudi kingdom for its close ties to the United States.

Several Saudi newspapers reported Sunday that the attackers threw at least one body from the Oasis building where they were holed up and mutilated some of the bodies of those killed.

One of the targeted oil industry compounds contains offices and apartments for the Arab Petroleum Investment Corp., or Apicorp, and the other — the Petroleum Center building — houses international firms.

Apicorp, in a brief statement published in the Saudi newspaper Al-Jazirah on Sunday, said three of its employees were among the dead. Apicorp is the investment arm of the Organization of Arab Petroleum Countries.

Offices at the Petroleum Center include a joint venture among Royal Dutch/Shell Group, Total SA and Saudi Aramco; Lukoil Holdings of Russia; and China Petroleum & Chemical Corp., or Sinopec. All of those employees were safe, said Shell spokesman Simon Buerk and a Saudi oil industry official, Yahya Shinawi. It was not clear if other companies in the center had accounted for all their employees.