The Dow Jones industrial average eked out a record close on Thursday, erasing sharp losses, as Wall Street bet on further gains from corporate earnings.

The 30-stock index finished 5.44 points higher at 23,163.04, while Travelers rose 2.4 percent and was the biggest contributor to the gains on the Dow. Travelers reported earnings per share that easily beat expectations.

The Dow had fallen 104.93 points at its session lows. Tech giant Apple saw its stock decline 2.5 percent, amid speculation of poor demand and cuts in production of iPhone 8. The stock was also posted its biggest one-day decline since Aug. 10.

The also erased its losses to manage a record close at 2,562.10, as a 12.2 percent gain in Adobe shares offset steep losses from United Continental. The airline's stock fell 12.1 percent.

The Dow and the S&P 500 rose slightly into the close after Politico reported that President Donald Trump was leaning toward Federal Reserve Governor Jerome Powell to be the next head of the central bank. Appointing Powell as the Fed chair would represent a continuation of the central bank's current regime.

The Nasdaq composite lagged, falling 0.3 percent to 6,605.07. Facebook, Google-parent Alphabet, Netflix and Amazon all finished lower.