Crude oil prices settled at $124 per barrel Wednesday.
Inflation worries were eased by a U.S. Labor Department report that said the consumer price index rose below expectations at 0.2 percent in April. Analysts had predicted a 0.3 percent rise.
The Dow Jones industrial average lost half its midday gains in late trading, but closed 66.20 points, or 0.52 percent, higher at 12,898.38.
The Standard and Poor's 500 index rose 5.62 points to 1,408.66, up 0.4 percent. The Nasdaq composite index gained 1.58 points to 2,496.70, up 0.06 percent.
On the New York Stock Exchange, 1,843 stocks advanced and 1,246 declined on a volume of 1.188 billion shares traded.
The 10-year U.S. Treasury note was unchanged, yielding 3.911 percent.
The dollar gained. The euro traded at $1.546 from Tuesday's $1.5478 and the dollar traded at 105.08 yen from Tuesday's 104.79 yen.
In Tokyo, the Nikkei index gained 164.82 points to 14,118.55, up 1.18 percent.
In London, the FTSE 100 index dropped 1.10 points to 6,210.80, off 0.02 percent.


