NEW YORK —The price of oil rose Monday, taking its cue from the stock market and the dollar.

Benchmark oil for June delivery gained 69 cents to close at $96.71 a barrel on the New York Mercantile Exchange.

Oil moved higher as U.S. stock markets reversed early losses around midday. Although stocks slipped in the afternoon, a weak dollar propped up oil prices.

Because oil is traded in dollars, a weaker dollar makes crude and other commodities more appealing to investors holding other currencies. The euro rose to 1.2897 from $1.2829 Friday. The dollar fell to 102.29 yen from 103.18 Friday.

At the pump, the average price for a gallon of gas is at $3.65 for the first time since late March. Unplanned refinery downtime in the Midwest has caused supply shortages and sent gas prices soaring in Minnesota, North Dakota and a few other states.

"The last seven days have delivered some shocks at the pump for motorists in the Midwest," said Patrick DeHaan, senior petroleum analyst for

"I don't believe I've ever seen gasoline prices in the Midwest surpass California. Areas of Nebraska, Minnesota, Oklahoma, North and South Dakota have done that," DeHaan said.

Meanwhile, gas prices in Denver have surpassed the national average, reversing a trend in which Denver prices had been holding well below other markets.

Denver gas prices reached $3.81 Monday, climbing a penny from Sunday and up from $3.74 a year ago, according to AAA.