Thursday was rough for short sellers.

That’s because Tesla Inc. announced a rare profit Wednesday as part of its third-quarter earnings report that sent shares of the electric automaker up nearly 20% almost immediately.

It meant short-sellers of the stock took a bath in serious losses … to the tune of nearly $1.4 billion, according to a note from S3 Partners, a financial technology and analytics firm.

Ihor Dusaniwsky is the managing director for predictive analytics for S3 Partners, and he tweeted the results of the short bet flop.

Short sellers were up nearly $2 billion in mark-to-market profits before the announcement. So that’s a $3.4 billion swing to the negative for shorts.

The swing nearly wiped out “almost 70% of their year-to-date profits,” S3 Partners said.

There had been some moving out of their short positions to hedge for a strong quarterly earnings report.

“Shorts were reducing their exposure in the event of a strong earnings report, but $8.3 billion of shorts held onto their positions and took a major hit to their bottom line,” the S3’s report said.

Long-term shorts may not feel the immediate pressure of Tesla’s third-quarter beat as they have “much more conviction and staying power,” whereas newer shorts are “much more susceptible to shot price-based buying and selling.”

“If TSLA’s stock price continues to climb we expect continued short covering to give the stock a short squeeze tailwind. If TSLA’s stock price surge pushes the stock steadily into the $300 range we should see shares shorted fall below the 30 million share level,” the report said. “That would be over 2.6 million shares of buying from the short side helping push TSLA’s stock price further into short squeeze territory.”

While Tesla experienced this third-quarter bump, the company is expected to have overall yearly losses after a difficult first and second quarter in 2019.

Company shares have lost approximately 11% this year, compared to double-digit gains in both the S&P 500 index and the Dow Jones Industrial Average.