STR/AFP/Getty Images

Tesla shares were volatile in after-hours trading on Wednesday after the electric-car maker reported first-quarter results that fell short of analysts' expectations.

The company also said it expected to return to profitability in the third quarter and reduce its losses in the second quarter.

Shares have fallen 21% this year amid concerns around underlying demand for Tesla's vehicles.

Watch Tesla trade live.

Tesla shares rose 2% during a volatile after-hours session on Wednesday after the electric-car maker reported a wider-than-expected loss and a 37% quarter-over-quarter drop in revenue.

The company said it expected to return to profitability in the third quarter and reduce its losses in the second quarter — a reversal from prior expectations that profitability would resume in the second quarter. Tesla also expects to see positive free cash flow, excluding capital expenditures, in every quarter of 2019.

"If our Gigafactory Shanghai is able to reach volume production early in Q4 this year, we may be able to produce as many as 500,000 vehicles globally in 2019," CEO Elon Musk and Zachary Kirkhorn, Tesla's chief financial officer, wrote in a letter to shareholders.

"This is an aggressive schedule, but it is what we are targeting. However, based on what we know today, being able to produce over 500,000 vehicles globally in the 12-month period ending June 30, 2020 does appear very likely."

Tesla produced about 63,000 Model 3 vehicles in the first quarter, a 3% jump from the prior quarter. Meanwhile, Model S and Model X deliveries declined to 12,100 vehicles — falling short of the company's two-year run rate of about 25,000 per quarter.

Here's what Tesla just reported, compared with what analysts polled by Bloomberg were expecting:

Adjusted loss per share: $2.90 versus $1.30 expected.

$2.90 versus $1.30 expected. Revenue: $4.54 billion versus $4.84 billion expected.

Morgan Stanley auto analysts earlier this month described the first quarter as one Tesla "may want to forget."

The beginning of 2019 has been dotted with a legal battle between Musk and the Securities and Exchange Commission, disappointing first-quarter deliveries, a plunging stock, employee layoffs, and a concern among Wall Street analysts that underlying demand has faltered.

The California automaker also unveiled its long-awaited $35,000 Model 3 in February, its Model Y crossover SUV in March, and plans for its self-driving technology this week.

Musk warned earlier this year that Tesla probably wouldn't turn a profit in the first quarter, reversing his prior forecast. He does expect Tesla to achieve profitability in the second quarter, however.

Ahead of Tesla's results, short sellers ramped up their bets against the company, according to the financial-analytics firm S3 Partners. Short interest in the name now hovers around the highest level of the year, the firm's data showed.

Read more: Inside Tesla Twitter, where legendary short-sellers and amateur investors gather to trash and praise Elon Musk's electric empire

At the same time, Wall Street analysts have become increasingly negative on Tesla, with the number of "sell" ratings on Wall Street topping "buys." According to data compiled by Bloomberg, 15 suggest "sell," 13 say "buy," and eight recommend "hold."

Tesla shares fell 2% on Wednesday, bringing the stock's 2019 loss to 21%.

Read more Tesla coverage:

Tesla's 'Autonomy Day' fell flat with analysts — now Wall Street is bracing for its Q1 results

Tesla is under pressure after shaking up its board and receiving a demand-fueled downgrade from Wall Street

Elon Musk's most hated group of investors are ratcheting up their bets against Tesla ahead of the company's earnings

Why Tesla won't hit its AV ride-hailing goals

Markets Insider

NOW WATCH: What happens if you stop washing your hair for a year