CHICAGO (Reuters) – Crude oil prices set a record high Tuesday on fears that top exporter Saudi Arabia was vulnerable to terror attacks while soaring grain prices also pushed commodity price indexes back toward multiyear highs.

At the New York Mercantile Exchange, crude oil prices shot up more than 6 percent and closed above $42 for the first time in the 21-year history of NYMEX oil trading.

Islamic militants over the weekend attacked offices of Western companies in the Saudi oil city of Khobar, killing 22 people including 19 foreigners and raising alarm about political instability in the world’s largest oil exporter.

“It’s all about the Saudi story, as it looks like the attacks have the Saudi infrastructure in the crosshairs,” said Nauman Barakat, a senior vice president at broker Refco.

Crude oil traded at a record NYMEX futures price of $42.38 a barrel, eclipsing the previous record of $41.85 on May 17.

NYMEX July crude closed $2.45 higher at $42.33 a barrel. In London, July North Sea Brent rose $2.50 at $39.08 a barrel.

Ministers of the Organization of Petroleum Exporting Countries, ahead of their Thursday meeting in Beirut, tried to talk down the market, with a senior OPEC delegate saying the cartel would likely pump about 1 million barrels per day (bpd) of actual extra supply if it raises its formal quota limits.

Saudi Arabia has already said it will pump 9 million bpd in June, far in excess of any new quota it is likely to get under an OPEC group increase. Kuwait has also raised output this month by about 150,000 bpd to almost 2.4 million bpd.

The weekend attack in Saudi Arabia resulted in 22 killed after militants took hostages in the eastern city of Khobar.

The city, 240 miles (400 km) northeast of capital Riyadh, has no production, export or refining facilities. But Western oil firms have offices and housing there.

Oil markets now fear that militant Islamic fighters may shift from soft targets to production and export facilities.

“The security premium has been reinforced,” said John Kilduff, senior vice president at Fimat USA.

Qatari Oil Minister Abdullah al-Attiyah said the “fear factor” was inflating crude costs by $9 a barrel.

NYMEX July gasoline closed 6.55 cents higher at $1.3530 a gallon. The June contract expired Friday up 5.15 cents at $1.4367, having set a NYMEX record high at $1.47 on May 20. NYMEX July heating oil rose 6.12 cents at $1.0641 a gallon.

At the COMEX, the jitters about Saudi Arabia pushed gold to a five-week high before the market ran out of gas shy of $400 an ounce. A report showing that the U.S. manufacturing sector was strong last month halted a dollar sell-off and stole gold’s thunder before it could breach $400, COMEX traders said.

Dollar disinvestment favored gold, which is seen as a safe haven, lifting the COMEX August contract to $399.80 an ounce, its highest since April 28. It ended up 60 cents at $395.50.

Gold bullion was last quoted at $394.30/5.05, up from the $393.80/4.55 on Friday. London’s afternoon fix was $397.20.

At the Chicago Board of Trade, heavy rains and winds in the U.S. Midwest over the long holiday weekend sent corn, soybean and wheat prices soaring on fears of crop damage, seeding delays and potential outbreaks of moisture-related diseases.

CBOT July soybeans closed up 50 cents a bushel at $8.64 and July corn closed up 20 cents a bushel at $3.24, both ending locked up their daily allowable trading limits.

“It puts more focus that we need record production, and it may be more difficult to do that,” Shawn McCambridge, a grain analyst at Prudential Securities, said of the corn market.

CBOT July wheat closed up 26-1/4 cents a bushel at $3.88-1/4, with traders citing blown-over fields from Illinois to Ohio and increased chances for head scab, a fungal disease that sharply devalues wheat quality for flour millers.

“The combination of excessive and frequent rains and warmer temperatures hasn’t been good. There is scab in the fields and if it continues to rain we’ll have more problems,” said Dennis Epplin, extension agronomist at the University of Illinois.