Saudi security forces have foiled an apparent suicide car bomb attack on a major oil production facility in the eastern town of Abqaiq.
Guards opened fire on at least two cars carrying explosives as they tried to ram the gates. Two guards were killed.
BBC security correspondent Frank Gardner says the attack is the first direct assault on Saudi oil production.
The al-Qaeda network on the Arabian Peninsula has long called for attacks on Saudi oil installations.
Saudi Oil Minister Ali al-Nuaimi said output at the facility, which handles about two-thirds of the country's oil production, was unaffected by the attack.
Oil security analysts have estimated that a serious attack on the facility could halve Saudi exports for up to a year.
The attack was followed by a fire fight outside the plant
On news of the attack, the price of crude oil for April delivery leapt as much as 3.4% to $62.60 a barrel on the New York Mercantile Exchange, its biggest gain since 17 January.
An oil industry expert told the BBC News website that Abqaiq is an extremely important gathering point for crude oil coming in from several large oil fields.
There the oil is processed to remove gas and render it less volatile.
Saudi officials said at least two cars packed with explosives tried to ram the gates of the facility in the eastern province of Dammam.
Security guards opened fire, causing at least one of the vehicles to explode, killing the occupants.
Two of the guards were killed, and another two were wounded, Saudi officials said.
Mr al-Nuaimi said the blast caused a "small fire", which was brought under control.
He denied earlier reports on al-Arabiya television that the attacks had briefly stopped the flow of oil after a pipeline was damaged.
The cars carried the logo for Aramco, the state oil company.
The Associated Press news agency quoted an unnamed Saudi journalist as saying guards battled with two other militants outside the plant for two hours.
There was no immediate claim of responsibility for the attack but last September al-Qaeda's second-in-command, Ayman al-Zawahiri called for attacks on oil facilities, saying oil revenues went to what he called "the enemies of Islam".
Saudi Arabia has been fighting Islamic militants in the country for the past three years.
Attackers have previously targeted oil company offices and compounds housing Westerners, while Saudi security forces have killed dozens of insurgents.