By Chloe Aiello

Shares of electric carmaker Tesla plummeted more than 10 percent on Wednesday after the company reported weaker than expected second quarter losses and revenue, and slimmer margins than analysts had hoped for.

Tesla ($TSLA) reported loss per share of $1.12 on revenue of $6.35 billion ー an almost 59 percent jump from the $4 billion in revenue the company reported last year. Earnings also jumped from a loss of $3.06 last year at this time. Analysts surveyed by Thomson Reuters had expected a loss of 40 cents on $6.41 billion in revenue.

In spite of the larger than expected loss, Tesla said it expected to return to profitability in the third quarter. It also stuck to its previously announced guidance that it would deliver anywhere from 360,000 to 400,000 vehicles in 2019, up significantly from the 250,000 they delivered in 2018.

Embattled CEO Elon Musk in February tweeted that the company would deliver 500,000 cars by the end of the year, CNBC reported, then later backtracked amid a resulting outcry that he was violating the terms of his previous settlement with the Securities and Exchange Commission. When Tesla released its second quarter delivery numbers earlier this month, however, they did prove to be among the strongest delivery figures for the carmaker to-date. The company reported it delivered a record 95,200 vehicles in the second quarter and produced 87,048. Shares had been coasting on that news since it was released on July 2.

Tesla’s vehicle margins also fell below some analysts' expectations. The automaker had previously renewed emphasis on its mid-range Model 3 vehicles, designed in part to cut costs and shift focus away from its more expensive-to-produce Model S and Model X vehicles. The company reported a quarterly automotive gross margin of 19 percent, which is lower than some analysts were hoping for.

Wedbush analysts Dan Ives and Strecker Backe, for example, published a note prior to Tesla's earnings that set the bar at 20 percent margins.

"Balancing the ability to hit [delivery and production] goals with a profitable business model remains the crux of the challenges as gross margin (driving 20%+ GM key) needs to tick up despite selling a markedly lower priced Model 3 vehicle with some recently announced price cuts adding to this issue," they wrote, adding "the last thing Musk (and investors) wants to do is eventually see Tesla come back to the markets for another capital raise."

Citigroup analysts wrote in a note that anything lower than 21 percent to 23 percent would "support the bear case on Tesla’s profitability," CNBC reported.

Tesla also issued an update Wednesday on its Chinese operations. The company said it started moving machinery into its Shanghai Gigafactory, where it hopes to make an even lower cost Model 3 when it starts production by year's end. Also, by the close of 2019 Tesla said it hopes to start producing its electric crossover utility vehicle, the Model Y, in its Fremont, California, factory.

Shares of Tesla were last down 10.6 percent at $236.69 per share in after hours trading.