Tesla Inc. shares zoomed toward their highest level in months after the Silicon Valley car maker surprised Wall Street with a quarterly profit, but at least one corner of the equity market was licking its wounds on Thursday.

Tesla TSLA, +5.04% short sellers were in for about $1.4 billion in paper losses post third-quarter earnings, S3 Partners, a financial technology and analytics firm, said in a note. Before the rally, short sellers, who bet on a stock falling in price, were up more than $2 billion in mark-to-market profits.

Read more: Tesla stock rallies 20% after surprise quarterly profit

Tesla is the second largest short in the U.S. equity market behind Apple Inc. AAPL, +3.75%

Shorts sellers have been trimming their Tesla positions since June, and many reduced their exposure ahead of earnings, hedging for a strong earnings report. About $8.3 billion worth of shorts held on to their positions, however, “and took a major hit to their bottom line,” S3 said.

“We are expecting more short covering and the continuation of this long-term short squeeze as (Tesla’s) stock price continues to show strength,” S3 said in a report Thursday.

See also:Tesla bull praises ‘Picasso-like’ quarter, but others question whether profit can be sustained

That has created two types of Tesla short sellers, those who have shorted the stock for a long time “with much more conviction and staying power,” and the newer shorts, who are more momentum-based and more willing to exit a losing position.

“While the first group is relatively short-squeeze impervious, the second group is much more susceptible to stock price-based buying and selling,” S3 said.

Tesla’s short-seller interest hovers around $8.31 billion and about 32.62 million shares shorted, or 23% of Tesla’s float. If the stock stays steady in the $300 range, the number of shares shorted are likely to fall below 30 million, S3 said.

Related:Boeing, Caterpillar report disappointing earnings

Short sellers bet on a stock falling in price. They then borrow the shares to sell them, hoping they can later pick them up at a lower price, return them to the original lender, and pocket the difference.

Tesla Chief Executive Elon Musk has criticized short sellers numerous times, and said earlier this year the shorts were “feeling the burn.”

Tesla late Wednesday reported a hefty surprise third-quarter profit and sales that were slightly below Wall Street expectations.

The car maker also said key projects such as its China factory and next vehicle in its lineup, the Model Y, are “ahead of schedule.” It kept its goal of delivering more than 360,000 vehicles this year and vowed to remain profitable with “possible temporary exceptions.”