NEW YORK (Reuters) - The benchmark S&P 500 stock index edged higher, nearing a six-month high on Thursday, with losses in technology stocks countered by gains in Boeing Co and Facebook Inc as investors waited for more clarity on the U.S.-China trade talks.

Negotiations continued in Washington after meetings last week in Beijing, as the two countries worked toward resolving their long-standing trade dispute, which has cast a shadow over global economic growth.

U.S. President Donald Trump is set to meet Vice Premier Liu He, who is leading the Chinese side in the talks, on Thursday.

Hopes of a trade deal have helped fuel the S&P 500’s strong start to the second quarter. It has reached its highest level since Oct. 9 and is only 1.75% below its all-time closing high.

Also helping investor sentiment, data from the U.S. Labor Department showed that jobless claims fell to a 49-year low last week, pointing to sustained labor market strength.

“You look at the jobless claims number, you’re seeing potential progress on a trade deal,” said Shannon Saccocia, chief investment officer at Boston Private. “That’s why there’s a little bit more of a pick-up here.”

Investors will get a clearer picture of the U.S. labor market on Friday, when the non-farm payrolls report is expected.

Slideshow ( 7 images )

The Dow Jones Industrial Average rose 166.5 points, or 0.64%, to 26,384.63, the S&P 500 gained 5.99 points, or 0.21%, to 2,879.39 and the Nasdaq Composite dropped 3.77 points, or 0.05%, to 7,891.78.

Seven of the 11 major S&P sectors were higher. Conversely, the technology sector fell 0.4%.

Gains in Facebook and Boeing shares helped push the S&P 500 forward.

Facebook rose 1.4%, contributing to a 0.7% gain in the communication services sector, after brokerage Guggenheim upgraded the social media company’s stock to “buy” from “neutral.”

Boeing climbed 2.9%, adding the most to gains on the Dow and the S&P industrial index, which rose 0.6%.

Ethiopian investigators urged Boeing to review its flight control technology in the first public findings on the March crash of a 737 MAX jet. A Morgan Stanley analyst said the report potentially took the worst case scenario of an entirely new cause off the table.

Slideshow ( 7 images )

But the Nasdaq snapped a five-day run of gains, as it was pressured by a fall in the shares of Microsoft Corp and Tesla Inc.

Tesla shares tumbled 8.2% after the electric carmaker’s deliveries fell 31% in the first quarter.

They pared some losses in afternoon trading as Chief Executive Elon Musk’s role at the company appeared safe, with a federal judge in Manhattan urging the billionaire to settle contempt allegations by the Securities and Exchange Commission.

Advancing issues outnumbered declining ones on the NYSE by a 1.82-to-1 ratio; on Nasdaq, a 1.31-to-1 ratio favored advancers.

The S&P 500 posted 20 new 52-week highs and one new low; the Nasdaq Composite recorded 49 new highs and 36 new lows.

Volume on U.S. exchanges was 6.33 billion shares, compared with the 7.37 billion average for the full session over the last 20 trading days.