Stocks ended mostly lower on Wall Street after a late wave of selling wiped out what was left of a modest midday rally and more in Wednesday’s Stock Market Update.

Internet and media companies fell the most Wednesday. Netflix sank 1.6% and Google’s parent company Alphabet lost 0.7%. Tripadvisor plunged 11.4% after missing analysts’ revenue estimates.

Trading was choppy a day ahead of the latest trade talks between the U.S. and China. Investors have been on edge since President Donald Trump threatened to impose higher tariffs on Chinese goods by Friday.

Trump said on Twitter that China is coming “to make a deal” but that he’ll still be ready to raise tariffs if the negotiations fail to produce an agreement.

“The market right now is pricing in the assumption that a deal is going to be done,” said Jeff Zipper, managing director at U.S. Bank Private Wealth Management. “And if a deal is not done, you’ll see what the market could do based on yesterday’s price action.”

Wednesday’s modest gains followed a sharp pullback the day before as traders worried that a deal wouldn’t be reached before the tariff deadline and as animosity between the two sides appeared to escalate.

Investors have been anticipating a deal throughout this year, which contributed to double-digit gains in all the major indexes. But the latest tough talk is raising anxiety on Wall Street and casting more doubt about a resolution.

The U.S. government has filed plans to raise tariffs on $200 billion worth of Chinese imports from 10% to 25% Friday. If it follows through on those plans, it would mark a sharp escalation in the yearlong trade dispute that has raised prices on goods for consumers and companies.

Technology and health care companies accounted for much of the rebound. Utilities companies lagged the broader market. Chipmaker Advanced Micro Devices climbed 1.6%, while drugmaker Mylan gained 1.6%. NRG Energy fell 4.3% and TripAdvisor plunged 11.41% after the vacation ratings company reported revenue that fell short of what analysts were expecting.

DAILY STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 fell 4 points, or 0.2%, to 2,879. The Dow Jones Industrial Average edged up 2 points to 25,967. The Nasdaq fell 20 points, or 0.3%, to 7,943.

Bond prices fell. The yield on the 10 year Treasury rose to 2.48%.

Major stock indexes in Europe closed with modest gains.

ROUGH RIDE: Lyft slumped 10.8% after reporting a first quarter loss that was far wider than Wall Street had forecast. The ride-hailing company lost $1.1 billion in its first quarter as a public company, primarily because it paid out $894 million in stock-based compensation and related payroll taxes during its initial public offering. The report comes just days before the hotly anticipated IPO of Lyft’s much larger rival, Uber.

GOOD GAME: Electronic Arts rose 1.2% after the video game maker soared past Wall Street’s fiscal fourth quarter profit forecasts. The company also beat revenue forecasts. It launched several new games during the quarter, including “Apex Legends” as it competes with hit games like “Fortnite” from rival Epic Games.

FEELING CHIPPER: Qorvo climbed 3.3% after the chipmaker beat Wall Street’s fourth-quarter profit and revenue forecasts gave investors a strong forecast for the current quarter.

BAD TRIP: Investors punished TripAdvisor’s report of surprisingly low revenue during the first quarter. Analysts expected a gain. The company said international sales were softer than expected. The stock tumbled 11.4%.

NOT SO SLICK: Marathon Petroleum slid 6.9% after the oil refiner reported a surprise first quarter loss and announced the merger of two of its operations for $9 billion.

© The Associated Press. All rights reserved.