In 2016, Tesla Motors Corp. (TSLA) turned a profit after fourteen quarters of losses and persistently negative cash flows. Now investors are wondering whether the company will remain profitable this year.

As with other news in 2016, Tesla's turnaround came about in dramatic circumstances. (See also: Tesla Shares Fall After Goldman Downgrade.)

Dubious Profits

Even as skeptics predicted doom for the company, Musk emailed employees exhorting them to “produce every car possible” so that the company could “throw pie in the face of Tesla critics.” Eventually, he did that during the company’s third-quarter results, when Tesla turned in a small profit of $22 million after ballooning from $294 million in 2014 to $888 million in 2015.

While Tesla did announce record sales during the third quarter, it is unlikely that those numbers contributed to its profitability. Instead, analysts contend that the company’s sale of zero emission vehicle (or ZEV) credits, instituted by the California Air Resources Board (CARB), was the main reason. Based on filings, they calculated that the company sold $139 million worth of ZEV credits in the market and this inflated its earnings. For example, Jim Collins at The Street calculated an addition of 88 cents to Tesla's non-GAAP earnings due to the credits sale.

Tesla also performed an accounting sleight-of-hand to inch towards profitability. It began counting sale revenues inclusive of its resale price guarantees. (See also: Why Tesla Needs To Report Profits Today.) Musk is confident that the company will be able to repeat its profitability during the fourth quarter. But analysts are doubtful.

Rising Costs

The main reason is that the company’s costs are expected to balloon due to business commitments. Those commitments range from expansion of production facilities to manufacture the Model 3 mass-market electric car, to financing its $2.8 billion SolarCity Corp. (SCTY) acquisition, to ramping up car deliveries to 500,000 in 2018.

Colin Rusch from Oppenheimer & Co. has estimated that the company will need $12.5 billion through 2018 to finance its various ventures. (See also: Combined Tesla-SolarCity Entity Will Need $12.5 billion Over Next Two Years, Says Analyst.) The company reported $3.08 billion cash on hand during its latest quarter. Last quarter was only the second time in its history as a publicly-listed company that Tesla reported a positive cash flow. But it is likely that expansion of its facilities will take precedence over generating positive cash flows for Tesla in the coming quarters.

That means profits may be unlikely at Tesla in 2017.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.