Stocks ended higher on Wednesday as materials shares rose, but rising commodities prices due to turmoil in the Middle East and North Africa could keep rallies modest.

Based on the latest available data, the Dow Jones industrial average <.DJI> rose 67.47 points, or 0.56 percent, to end unofficially at 12,086.10. The Standard & Poor's 500 Index <.SPX> added 3.77 points, or 0.29 percent, to finish unofficially at 1,297.54. The Nasdaq Composite Index <.IXIC> gained 14.43 points, or 0.54 percent, to close unofficially at 2,698.30.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)