After a 12-hour chase on foot through desert mountains, Saudi forces killed two militants Wednesday, and officials linked them to a deadly attack on the oil hub of Khobar (search), hundreds of miles across the kingdom.

The Khobar attack came over the weekend, when suspected Al Qaeda (search ) gunmen raided a complex housing foreign oil workers and held hostages for 25 hours at a hotel on the site until Saudi forces raided the site. Twenty-two people were killed.

A Saudi official revealed for the first time that four Americans who were staying at the hotel took refuge on the roof without the knowledge of the gunmen and were rescued a few hours before the siege ended. He said the hostages were in contact with security forces by telephone, and the main concern was keeping their presence a secret from the militants.

The official, who spoke on condition of anonymity, did not say how the Americans were rescued or where they are now.

The official also said that the two militants killed Wednesday were not among three suspected Al Qaeda members who escaped the Khobar siege.

Attacks on Westerners persisted Wednesday. The U.S. Embassy said gunmen fired on American military personnel in Riyadh, slightly injuring a driver. Saudi officials said the wounded man was Saudi.

The attack in Khobar, 250 miles northeast of Riyadh, sent oil prices to record highs before retreating slightly Wednesday. OPEC (search ) should boost oil output further to curb surging prices, said the cartel's president, Purnomo Yusgiantoro of Indonesia. He spoke ahead of a meeting Thursday in Beirut of the Organization of Petroleum Exporting Countries.

The two militants, one dressed as a woman, were killed Wednesday in the remote mountainous area of al-Hada in western Saudi Arabia, a Saudi security official said. The area is 700 miles away from Khobar, on the other side of the country.

Troops stopped the men's car at a military checkpoint on the Taif-Mecca highway Tuesday evening. The militants refused to show their identity cards, said the official.

The two got out of their car, pulled out machine guns and started firing at the soldiers, according to the official, who spoke on condition of anonymity. The soldiers pursued the men up the mountains and after 12 hours killed them early Wednesday, he said.

Saudi television showed video footage of what it said was the Taif operation, with a transport helicopter landing in a desert plain and two bodies covered in bloodstained white sheets and thermal reflective blankets being carried away on stretchers by security forces.

Three militants escaped the Khobar standoff, and one other was wounded and arrested, according to Saudi officials.

The security official, explaining how the two men killed could be linked to those who escaped, suggested that their phone numbers could have been found on the attackers' mobile phones or they may have aided the men by providing shelter, money or other assistance.

"Surveillance of those who carried out the criminal attack in Khobar resulted in tracking down the movements of key elements connected to this incident," the Interior Ministry said in a statement. It said there were no injuries among security forces.

The statement did not identify the two men. Another Saudi security official identified one of them as Abdul Rahman Mohammed Yazji, No. 25 on a list of Saudi Arabia's 26 most-wanted militants.

The past six weeks have seen an escalation in attacks in Saudi Arabia, despite an aggressive government campaign against terrorism.

Saudi officials have linked the militant violence to Al Qaeda or to other groups believed inspired by Al Qaeda leader Usama bin Laden. The terror network has vowed to destabilize the Saudi government, which the Saudi-born bin Laden views as insufficiently Islamic.

In Wednesday's attack in Riyadh, shots were fired on two vehicles carrying American military personnel near a Saudi national guard compound where a U.S. training unit is based, the U.S. Embassy said.

A driver was slightly injured, and the convoy returned to the compound, the embassy said in a statement, adding that Saudi officials were investigating.

In Washington, Saudi Embassy officials said the Saudi government is dissolving a large Riyadh-based Muslim charity, Al-Haramain Islamic Foundation, along with other Saudi charities in continuing attempts to prevent donations from being siphoned off to bankroll terrorism.

The Khobar attack had sparked increases in already high global oil prices, amid fears that the Saudi government, which controls the world's largest proven crude reserves, cannot protect its oil installations.

In Lebanon, Saudi Oil Minister Ali Naimi said his country was taking adequate steps to safeguard its most important facilities.

Saudi Arabia is already boosting its own production to try to bring down prices. Naimi said he would urge OPEC to raise its output ceiling by as much as 2.5 million barrels a day, or 11 percent.