While Tesla’s stock has been on the rise for what seems like an eternity now, there was a pivotal contributor to the ever-increasing interest. You might have heard that, in 2020, Tesla turned a profit. What you may not know, is that this net profit wasn’t thanks to the sales of their cars.

With increasing concern among consumers as to their carbon footprints, it may be surprising that an EV-only company such as Tesla turned a full-year profit for the first time in 2020. But what’s even more astonishing is that they did so not thanks to the introduction of cheaper models, selling more cars, or cutting costs. No, instead they turned a profit thanks to selling greenhouse gas credits to rival manufacturers.

See Also: Elon Musk Says Tesla Roadster Won’t Enter Production Until 2022

It turns out that 11 states require automakers to meet strict emissions targets designed to encourage automakers to sell more zero-emission vehicles. If they unable to do so, they must buy regulatory credits from another automaker. With Tesla selling nothing but EVs, they’re left with a surplus each year. These credits are then sold to rival automakers at 100 percent profit.

Although the purchase of regulatory credits has been happening for some time, speculation surrounding a Democratic win throughout 2020 likely spurred many manufacturers to stock-pile credits in anticipation of stricter rules under a Joe Biden administration.

More: Tesla Model Y Popularity A Major Factor In Brand’s Q4 Deliveries

Tesla has brought in $3.3 billion from regulatory credits over the last three years, with $1.6 billion — just under half — earned in 2020 alone. According to CNN, Tesla’s Chief Financial Officer Zackary Kirkhorn concedes that such sales aren’t a sustainable measure in which Tesla can base its business.

Without credits sales, Tesla would have posted a net loss for 2020. Tesla, on the other hand, points out that it doesn’t depend on credits sales to be profitable, as its gross profit from their automotive segment of the business in 2020 was $5.4 billion, even without the regulatory credits revenue. This was spurned by its continued growth in key markets, including China. This significant aspect of Tesla’s financial performance is a strong sign for the EV company, as many base their predictions on this core metric.

While there will likely always be a heated debate between Tesla devotees and those waiting for its stock to crash, there’s no doubting the impressive and rapid growth that Elon Musk’s company has been able to achieve — regulatory credits or not.