extended its pre-market gains to 9 percent in the U.S., reaching a total market cap of $228 billion, as its latest deliveries data beat analyst expectations.

Tesla said earlier it delivered 90,650 vehicles in the second quarter, compared to market estimates of 83,071.

Tesla got a big boost from its new factory in Shanghai, which began delivering electric cars to public customers in January.

The automaker also began production of the Model Y crossover in March and hastily reopened its Fremont, California, factory in May so it could continue to meet soaring order demand.

According to Tesla Chief Executive Elon Musk, the model is expected to be the company's best-selling model.

Earlier this week, Musk told Tesla employees that the company may be able to avoid a loss in the second quarter.

In an email to employees, he wrote that achieving break-even looks urgent. Every car everyone builds and delivers has a big impact on the company.

Musk often sends out an internal memo at the end of the quarter to boost employee morale, push for results and send positive signals to investors, but sometimes he's a little overly optimistic.

In the quarter ending last September, Tesla reported a then-record 97,000 deliveries, but That's below the 100,000 he mentioned in an email to employees.