Tesla CEO Elon Musk talks to media as he arrives to visit the construction site of the future US electric car giant Tesla, on September 03, 2020 in Gruenheide near Berlin.Odd Andersen | AFP | Getty ImagesOn Tuesday, Tesla CEO Elon Musk tweeted that his electric car company had been about a month away from bankruptcy in recent years when it was still figuring out how to mass-produce the Model 3 electric sedan.In the middle of a discussion about Tesla’s fundraising history, a follower asked, “How close was Tesla from bankruptcy when bringing the Model 3 to mass production?”Musk replied: “Closest we got was about a month. The Model 3 ramp was extreme stress & pain for a long time — from mid-2017 to mid-2019. Production & logistics hell.”Musk has often spoken about what he calls the “production and logistics hell” of taking a new electric vehicle into high-volume manufacturing. However, Musk and the company had never disclosed exactly how little runway they had before facing a possible bankruptcy.In early 2019 — when Tesla was manufacturing fewer than 63,000 Model 3’s per quarter — Elon Musk raised billions by promoting Tesla’s self-driving ambitions at an Autonomy Day event and in calls with institutional investors.At that time, Musk and other Tesla execs said in quarterly financial filings and investor calls that the company would be able to fund its business needs with existing cash flow, but the company was raising just in case of a recession or weak global auto demand.In Q3, Tesla reported its fifth consecutive quarter of profitability, thanks in large part to sales of regulatory credits.The company no longer breaks out production numbers for the Model 3 alone. However, since its “production and logistics” hell with the Model 3 in the U.S., it has opened a new factory in Shanghai where its goal is to produce 150,000 Model 3s per year, and then increase annual production to at least 250,000 vehicles a year, including the Model Y and Model 3.On Tuesday, Musk also seemed to defend his unprecedented CEO compensation package on Twitter.A fan commented on Musk’s agreement in 2018 to remain as Tesla CEO, working for no salary but instead racking up the rights to buy shares in the company later at locked in prices, if the business meets certain milestones.Musk replied, referring to his other venture, SpaceX: “Yes, although I didn’t expect the stock to rise so much so soon. The reason for the stock options is that they’re needed to help pay for humanity to get to Mars in 10 to 20 years.”Musk has earned several tranches of this compensation package worth more than $11 billion as the coronavirus pandemic raged. At the same time, Tesla has slashed employee pay, furloughed workers and told factory workers to come back to build cars in Fremont, California, before the state and county had deemed it safe to do so.