U.S. stocks closed slightly higher on Wednesday, notching record highs, as a gain in the energy sector offset losses in tech.
The Dow Jones industrial average rose 39.3 points to close at 22,158.18 — a record — with Chevron contributing the most to the gains. Apple, however, was the biggest loser in the index.
The S&P 500 rose 0.1 percent and finished the session at 2,498.37, also a record, as energy gained more than 1 percent to lead advancers.
Energy stocks received a boost from oil prices, which rose 2.2 percent to a five-week high of $49.30 per barrel on an improving demand outlook.
Technology stocks were among the worst performers, however, falling 0.2 percent after closing at a record high on Tuesday.
"The real key [for the market] will revolve around whether Technology can strengthen from here given its push up towards highs of its recent range, while Apple starts to show some evidence of peaking out in the short run," said Mark Newton, managing member at Newton Advisors, in a note."
The Nasdaq composite closed 0.1 percent higher at 6,460.19 despite shares of Apple dropping 0.8 percent.