NEW YORK, Aug 9 (Reuters) - The S&P 500 and Dow ended down slightly on Thursday as gains in Apple and Amazon were offset by losses in energy and financial shares.

Tesla Inc's shares also fell to a two-day low and wiped out all of the gains fueled by Chief Executive Elon Musk's recent tweet announcing a plan to take the company private. The stock ended down 4.8 percent.

The S&P 500 was in slightly positive territory most of the day, putting it once again close to the record high it hit Jan. 26. The Nasdaq also neared its all-time high.

The technology sector has been at the center of a sharp recovery in U.S. stocks since a market rout in February.

Shares of Apple rose 0.8 percent, while those of Amazon were up 0.6 percent.

"It's hard pressed for this market to really leap ahead. It's been a slow, steady climb, led by an increasingly smaller number of companies," said Rick Meckler, partner at Cherry Lane Investments, a family investment office in New Vernon, New Jersey.

"Somehow, technology seems a little more insulated" to concerns facing some companies, including trade war tensions, Meckler added.

Leading sector declines was the S&P energy index, which fell 0.9 percent. Occidental Petroleum fell 4.2 percent after it maintained a tepid production forecast for the year. The S&P financial index was down 0.6 percent.

The Dow Jones Industrial Average fell 74.52 points, or 0.29 percent, to 25,509.23, the S&P 500 lost 4.12 points, or 0.14 percent, to 2,853.58 and the Nasdaq Composite added 3.46 points, or 0.04 percent, to 7,891.78.

The biggest drag on the S&P 500 was Booking Holdings , which fell 5 percent after it forecast third-quarter profit below expectations.

The latest data pointed to strength in the labor market, underscoring the health of the U.S. economy despite ongoing trade tensions.

The number of Americans filing for unemployment benefits unexpectedly fell last week, a Labor Department report showed.

Declining issues outnumbered advancing ones on the NYSE by a 1.04-to-1 ratio; on Nasdaq, a 1.10-to-1 ratio favored advancers.

The S&P 500 posted 26 new 52-week highs and three new lows; the Nasdaq Composite recorded 97 new highs and 68 new lows.

About 5.9 billion shares changed hands on U.S. exchanges. That compares with the 6.3 billion daily average for the past 20 trading days, according to Thomson Reuters data. (Additional reporting by Amy Caren Daniel in Bengaluru; Editing by Anil D'Silva and James Dalgleish)