Tesla shares shot up $45, or nearly 20%, on Thursday after the company reported a rare quarterly profit. Most analysts had been expecting a loss.

The stock price gain clobbered short sellers -- bearish investors who bet shares will fall -- with a $1.5 billion paper loss on Thursday alone.

Tesla remains one of the most shorted stocks in the market.

Wall Street short sellers, many of whom have long believed Elon Musk's electric car maker Tesla is a junker, got run over on Thursday, losing about $1.5 billion in one day on their bearish bets after the company reported a rare quarterly profit.

Tesla's stock price jumped about $45 to nearly $300 after Musk's company reported late on Wednesday that the company had turned a profit in the third quarter of $342 million. Analysts had been expecting the company to lose $72 million, according to FactSet.

That surprising news sent the stock soaring Thursday in the biggest increase in Tesla's stock since 2013. That clobbered short sellers, who borrow shares and then sell them in the hopes of buying them back later at a lower price, with a one-day paper loss of about $1.5 billion.

Get Breaking News Delivered to Your Inbox

It's only the fourth time Tesla has had a profitable quarter in the past five years, or 20 quarters. Tesla lost nearly $600 million in the first six months of the year, but is now expected to pull off back-to-back profitable quarters in the second half, earning another $200 million in the last three months of 2019.

Tesla has long been one of the most shorted stocks on Wall Street — and Musk has often publicly battled short sellers and other critics.

In one apparent effort last year to get back at short sellers, Musk tweeted he was taking the company private in a buyout offer for $420 a share. No actual buyout offer happened, and Musk and his company eventually split a $40 million fine to settle a Securities and Exchange Commission lawsuit, claiming he had purposely misled shareholders. Musk did not admit wronging.

As of yesterday, there were 32.6 million shares of Tesla sold short, according to S3 Partners, which tracks the data. That was down from earlier this year when as many as 43.7 million Tesla shares were sold short in early June.

But the loss for short sellers, at least for now, is just a pit-stop in what has been for the past year or so a very profitable ride. Even after Thursday's jump, Tesla's shares are still down 10.5% in 2019. S3 Partners estimates that short sellers have still collectively made $500 million betting against Tesla's stock this year.

And Tesla's short sellers are unlikely to unplug anytime soon. Despite the profit jump, Tesla's sales, which missed expectations, were down from the prior quarter and from a year ago.

A good portion of the third quarter profit came from the fact that Tesla was able to recognize as profit a chunk of cash it had already collected for pre-sales of its "summon" feature, which became available in September.

Tesla, like other car manufacturers, also is likely to be hit by the continued trade tensions with China.