U.S. blue chips ended higher on Thursday, as investors scooped up large-cap, defensive stocks such as Altria Group Inc., against a backdrop of mounting global tensions.
The Nasdaq was nearly unchanged as a rally in biotechnology shares was offset by profit warnings from the semiconductor sector.
The major indexes fluttered between positive and negative territory throughout a choppy session as the dispute between Iran and Britain over the capture of 15 British sailors and marines sent oil up more than $2. The gain in crude helped energy-sector shares but weighed down fuel-dependent manufacturers.
The Dow Jones industrial average ended up 48.39 points, or 0.39 percent, at 12,348.75. The Standard & Poor's 500 Index closed up 5.30 points, or 0.37 percent, at 1,422.53. The Nasdaq Composite Index finished up 0.78 points, or 0.03 percent, at 2,417.88.
Oil producers and other energy companies were among the top gainers as crude oil prices jumped. Crude for May rose $2 or 3.1 percent, to settle at $66.08 a barrel on the New York Mercantile Exchange. Exxon Mobil Corp. rose 0.9 percent, or 68 cents, to $76.24. Schlumberger Ltd. added 2 percent, or $1.35, to $70.67.
Industrial shares were the biggest drags on the Dow. Auto maker General Motors Corp. shares fell 1.1 percent, or 35 cents, to $30.89 and diversified manufacturer 3M Co. fell 0.4 percent, or 29 cents, to $76.09.