(Bloomberg) — Elon Musk warned of difficult times ahead for Tesla Inc. after one the automaker’s worst quarters in over a decade.

Most Read from Bloomberg

Tesla will be a transition period for the next year or more, losing electric vehicle incentives in the US and needing time to roll out autonomous vehicles, the chief executive officer said.

“Yeah, we probably could have a few rough quarters,” Musk said. “But once you get to autonomy at scale in the second half of next year, certainly by the end of next year, I would be surprised if Tesla’s economics are not very compelling.”

Tesla shares fell as he spoke, sliding as much as 5.3% in postmarket trading Wednesday in New York. The stock already had tumbled 18% this year through the close, even after rebounding from lows in March and April.

The company reported adjusted earnings of 40 cents a share, missing Wall Street’s already lowered estimates. Revenue fell 12% to $22.5 billion, the sharpest decline in at least a decade. Vehicle deliveries slumped and the average selling price of its cars dropped.

Tesla also reported falling sales from energy generation and storage and said costs from tariffs rose around $300 million. The impact from the levies is expected to grow in the coming quarters.

Tesla’s traditional carmaking business is struggling in the face of rising competition and continued fallout from Musk’s political activities. Investors have largely been willing to look past the sales decline and toward Musk’s promises of a future built around artificial intelligence, robots and self-driving technology, but the comments show there will be more turbulence before there’s any payoff in these investments.

“There will be some teething pains” as the company invests in robotics and autonomous driving, Musk said.

On the conference call, executives spent relatively little time discussing the EV business, spending portions instead talking about a planned expansion of the newly launched robotaxi service, its new Tesla diner, and whether the company could invest in the CEO’s new AI startup.

Musk also reiterated his desire for a greater ownership stake in Tesla — suggesting it should grow in order to prevent his ouster from an activist investor. His multibillion-dollar Tesla payout was gutted by a Delaware judge late last year, and the company is appealing the ruling and has moved its incorporation to Texas.

Story Continues