Meanwhile, last week's run-up in the price of oil is showing up at the gas pump in the U.S.. The average price for a gallon of gas rose a penny to US$3.48, the first increase in almost a month.
In New York, benchmark crude for August delivery gained 39 cents to close at $103.53 a barrel. The price has remained steady this week after rising $6.66, or nearly seven per cent, last week.
Oil was down in the morning when U.S. stock markets opened, then pushed higher as stocks rose. The Dow Jones industrial average finished the day up 75.65 points at 15,300.34.
Last week, oil was pushed above $100 a barrel for the first time since May 2012 by worries that turmoil in Egypt could disrupt oil and gas shipments through the Suez Canal.
Commerzbank in Frankfurt said in a report that a quick solution to the Egyptian tensions is unlikely. "The situation remains tense in other Middle Eastern countries too, meaning that a lasting risk premium of $5-10 per barrel on the oil price is justified," the bank said.
A number of factors could influence trading Wednesday. The Energy Department releases its weekly report on supplies of crude oil and petroleum products, the U.S. Federal Reserve releases minutes of its recent policy meeting and OPEC issues its monthly update on the oil market.
A large decline in U.S. supplies, or signs that OPEC decreased output last month could boost prices, analysts say. Additional insight into the Fed's thinking on when it should begin winding down bond purchases that have supported the U.S. economic recovery should also influence trading.
U.S. drivers are seeing the effect of higher oil prices. Gas prices levelled off last week after steadily declining in the second half of June. Tuesday, the average price gained five cents or more in Minnesota, Michigan and Missouri. Most other states reported small increases.
Higher pump prices could be temporary. The Energy Department forecast Tuesday that gas prices would average $3.38 a gallon over the second half of the year. The average so far for July is $3.48.
Brent crude, which is used to set prices for oil used by many U.S. refineries, was up 38 cents at $107.81 on the ICE exchange in London.
In other energy futures trading on the Nymex:
— Wholesale gasoline added four cents at $2.93 a gallon.
— Natural gas fell eight cents to $3.66 per 1,000 cubic feet.
— Heating oil gained one cent to $2.99 per gallon.
Pablo Gorondi in Budapest contributed to this report.
(TSX:ECA, TSX:IMO, TSX:SU, TSX:HSE, NYSE:BP, NYSE:COP, NYSE:XOM, NYSE:CVX, TSX:CNQ, TSX:TLM, TSX:COS.UN, TSX:CVE)