Uber shares plunged 6.3 percent in late trading to $40.27, after the ride-hailing giant reported a disappointing quarter capped by a record $5.2 billion loss.

Uber said it lost a whopping $5.2 billion, or $4.72 a share, in the second-quarter on revenue of $3.17 billion. Wall Street had been expecting a loss of $3.12 a share on revenue of $3.36 billion.

Investors sent the stock down in an after-hours selling spree that more than reversed the stock’s 8.2 percent gain during regular trading to close Thursday at $42.97 per share.

Analysts attributed the stock’s daytime run up to a halo effect caused by Lyft’s second-quarter report on Wednesday, which surprised Wall Street with higher-than-expected revenue and lower-than-expected losses.

Lyft also cheered investors of both companies by saying its price war with Uber was easing. The Uber rival’s stock climbed 5.8 percent over two days.

Uber, which went public on May 9 at a price of $45 per share, blamed $3.9 billion of the quarter’s $5.2 billion loss on stock-based compensation costs. Those consisted of payouts to workers and shareholders after Uber’s IPO and were recorded as non-cash expenses on the company’s second-quarter statement.

Despite Wall Street panning the result, Uber CEO Dara Khosrowshahi insisted they were “strong“ in a conference call with analysts.

He said total trips in the quarter were up 35 percent, and gross bookings, or the amount Uber collects before paying drivers, advanced 37 percent.

The $12.19 billion in gross bookings produced by Uber’s core ride-hailing business beat estimates, but the $3.39 billion in gross bookings recorded for the newer Uber Eats delivery fell short.

Khosrowshahi said he doesn’t expect near-term profitability for Uber Eats because it’s in a high-growth business where competition “continues to attract a lot of capital.”