Elon Musk, the SpaceX and Tesla CEO who once called panic over the coronavirus outbreak "dumb," has offered to make ventilators for patients if necessary.

In a Twitter thread where Musk discussed the possibility of a drug used to treat malaria as an option for COVID-19 patients, a user who said he's a Tesla owner pleaded with the CEO to repurpose factories to make ventilators.

"We will make ventilators if there is a shortage," Musk said in response.

After Musk was informed ventilator shortages are already happening, he followed up seeking information on affected hospitals.

"Tesla makes cars with sophisticated hvac systems," wrote Musk. "SpaceX makes spacecraft with life support systems. Ventilators are not difficult, but cannot be produced instantly."

Earlier this month, Musk drew attention after questioning the reaction to the spread of coronavirus. "The coronavirus panic is dumb," Musk wrote on March 6. Five days later, the World Health Organization declared the spread of COVID-19 had become a pandemic.

Meanwhile, Buzzfeed reported Musk had sent an email to SpaceX employees saying they're more likely to die from a car crash than the coronavirus.

On Tuesday, the auto maker's factory in Fremont, California, was declared a "nonessential business" after Alameda County enacted a shelter-in-place order, which could have led to a complete shutdown. NBC Bay Area reports the factory will remain open with a smaller workforce for "minimum basic operations." 

Contributing: The Associated Press. Follow Brett Molina on Twitter: @brettmolina23.