This week, union workers at a Ford manufacturing plant outside Detroit raced to set up new production lines. But instead of making hybrid car batteries, the usual output from the factory, they are preparing to churn out tens of thousands of ventilators, joining the sprint against the clock to fight the coronavirus.

Scrambling to get production underway, the workers took apart a ventilator and 3-D scanned each of the roughly 300 parts, creating computer simulations of how the device could be assembled efficiently. Ford, which has partnered with a ventilator-maker and GE Healthcare, has been rushing to train workers and obtain the parts to have its first prototype ready early next week.

Ford and General Motors both announced in late March that they would build the medical machines after shutting down car production and sending workers home, a historic redeployment of their factories and workers.

But the relatively late start of both companies means the bulk of their production will come online in May, possibly missing the peak load of cases expected by most U.S. health officials in mid-April.

“Time is not on our side,” said an auto executive involved with the efforts, who spoke on the condition of anonymity to candidly describe the progress of the effort. “Even though we are moving mountains … and we are moving as many as we can as fast as we can … these herculean efforts might not be enough.”

More than a month after the global pandemic took root in the United States, manufacturers across the country are overhauling their operations to produce the equipment needed for an anticipated spike in infections and hospitalizations, often under political pressure.

Ford said it aims to produce 1,500 ventilators by the end of the month. GM, which brought its first group of 100 project workers into training this week, said it will start producing 10,000 units per month by as early as mid-May.

But the University of Washington’s Institute for Health Metrics and Evaluation estimates that 32,000 ventilators will be required by the peak in mid-April, and the government only has about 10,000 stockpiled, President Trump said Tuesday. Hundreds of thousands of novel coronavirus patients are expected to flood hospitals around the country in the coming weeks, overwhelming medical staff who don’t have enough equipment to keep all the patients alive. New York Gov. Andrew M. Cuomo (D) has said his state needs 30,000 ventilators alone.

And while the ventilator Ford is building is simpler and could allow it to go faster than GM, it is designed to be used on patients who are being transported to hospitals in ambulances or helicopters and doesn’t have some advanced features that doctors, intensive care specialists and ventilator experts told The Washington Post they’ve come to rely on when treating coronavirus patients afflicted with acute respiratory distress syndrome.

President Trump ordered the automakers to build ventilators “NOW!!!!!!” in a tweet last week, invoking the Defense Production Act to order General Motors to get on the case.

The effort is a test of American manufacturing might the likes of which hasn’t been seen in decades. Employees and executives at Ford and GM said they’re working around the clock, driven by a sense of patriotism similar to when the companies were recruited to build equipment and airplanes during World War II.

“Everyone understands the importance of this,” said Adrian Price, director of global core engineering for vehicle manufacturing at Ford.

The problem, though, isn’t that automakers are moving slowly. It’s that they didn’t start early enough. As the disease raged in China and Italy, U.S. officials downplayed the dangers. A failure to implement widespread testing also obscured the spread domestically.

Companies in many industries are shifting to make products needed to slow the spread of the virus and protect vital health-care workers. Clothing brands such as Gap, Eddie Bauer and HanesBrands are making masks, gowns and other personal protective gear. Pernod Ricard, the owner of alcohol brands including Absolut, is making thousands of gallons of hand sanitizer.

But ventilators are the most critical machine for keeping the sickest patients alive. They provide extra oxygen and keep patients’ lungs pumping when they fill with liquid because of covid-19. Patients often need to be on them for two weeks.

Officials have turned to automakers to build the devices because of their manufacturing expertise and vast supply chains, with a proven ability to mass produce highly technical equipment in short windows of time. The automobile industry has been honing supply chains for a century, and it’s one of the only consumer industries that builds something as complex, and at the same scale, as the car. For example, GM cars typically have between 2,000 and 3,000 parts.

Automakers in other countries that have been severely hit by the coronavirus are also making ventilators. Fiat Chrysler is helping in Italy, where the disease’s spread has been particularly deadly. And McLaren and Rolls-Royce have joined the Ventilator Challenge, a consortium of large companies aimed at making thousands of the devices in the U.K.

In the United States, both Ford and GM have scrambled to find automobile component suppliers who are willing or capable of making ventilator parts instead. The two companies aim to enlist 1,500 workers combined for the effort. Ford aims to ramp up production to create 50,000 ventilators by July 4. GM said it could build up to 200,000 overall.

But that depends on both companies creating a fully functioning and tested machine that won’t worsen the problem. The automakers acknowledge they will miss the peak in cases.

“We’re always looking for opportunities to scale more quickly. If we find a way to do it, we’ll try to get them into the field as quickly as possible,” said Ford’s Price. “In this pandemic, time is of the essence.”

General Motors spokesperson Dan Flores said the team has been focused for two weeks on how to churn out ventilators. “Hundreds of people are working around the clock to make that happen as quickly as we can,” he added.

At the factory outside Detroit, Ford is partnering with Airon, a small Florida-based ventilator company that typically produces two or three machines a day. General Motors is pushing production in its Kokomo, Ind., plant, where it produces precision electronics, converting it into a factory of a ventilator designed by a small Seattle-area company called Ventec Life Systems. The final customer is likely to be the Federal Emergency Management Agency and other government agencies.

It was a change of pace for both Ford and GM. For major automakers, the process of designing and building a new car typically takes years in a long, drawn out process of trial-and-error. Company officials workshop designs, construct prototype builds, launch smaller production runs to validate them and, ultimately, ramp up assembly lines where they produce millions of cars per year.

Ford and GM have also made big asks of suppliers, which outfit vehicles like Chevy Silverados and Ford F-150s, to revamp their own supply chains to help create parts for the ventilators.

That can be complicated, said Ann Marie Uetz, an attorney at Foley and Lardner LLP who advises automotive suppliers to GM. “That tooling has to be rebuilt, refurbished, it has to be changed over for the part that’s going into the ventilator,” she added.

Ford’s shift from car to ventilator manufacturer began on March 20, a day after Ford shut down its plants because of the virus. The company started working with General Electric’s health care unit to help boost production of GE ventilators, which the company says has already yielded results. Ford was also considering building a ventilator, including a model designed by GE, at one of its own factories to help meet the massive demand.

Meanwhile, GE Healthcare got a call from an advisory firm representing Airon, which was exploring a sale or strategic partnership because the company’s 70-year-old owner did not have a natural successor. Akel Akel, the GE unit’s managing director for strategy and corporate development, suggested Airon speak with Ford about mass producing its ventilator in a Ford factory.

On March 26, a Ford manufacturing employee showed up at Airon’s factory in Melbourne, Fla., to learn how the ventilators were made. Airon also shipped a pNeuton Model A to Ford’s Michigan headquarters, where it was received by 10 p.m. that night. The next morning a team of engineers took it apart.

Within just a few days, roughly a dozen phone calls took place between Ford and Airon to discuss how the device works, how to build it and how to get enough component parts to make it, said Dave Sheppard, co-founder of MedWorld Advisors, which had been retained by Airon to explore a sale or strategic partnership. “I was really impressed with the Ford team.”

Price said Ford chose the Airon ventilator because it met the medical requirements for treating covid-19 patients, but was made of relatively few components, making it faster to manufacture. (The Airon machine will have between 250 and 350 components, while the Ventec machine GM is making has 419.)

“This one is an opportunity to scale quickly and leverage manufacturing expertise,” Price said. The Airon device also works without electricity, making it a good option for field hospitals, he said.

Price likened advanced features on more complex ventilators to cars with “a navigation system, leather seats and heated seats,” he said. “But does that help you get from A to B?”

But some doctors who are treating coronavirus patients say Airon’s simpler design isn’t adapted for the needs of coronavirus patients.

Dr. Matthew Aldrich, medical director of critical care at the University of California at San Francisco, said when his hospital considers purchasing a ventilator, staff members go through a vetting process and have a discussion with the company to determine features. “I would just hope that a similar process is being done to make sure we are investing our resources in a ventilator that can actually provide care that we need,” he said. He did not comment on the Airon ventilator specifically because he had not used it.

Pamela Fry, vice president at Airon, dismissed concerns that the machine can’t match the level of care coronavirus patients get with any other ventilator.

“We do not have the liberty at this time in the covid-19 crisis to decide which ventilators are better than others,” she wrote in an email. “All ventilators can service the adult respiratory distress syndrome that we are seeing with these patients.” She said the ventilator meets the needs defined by The White House.

“This pandemic is unprecedented, and for those patients who may require a simplified, more basic ventilator, it still has the potential to be lifesaving,” said Dr. Jeff Hersh, who helped assess the Airon device for GE Healthcare, where he serves as chief medical officer, in an emailed statement. A GE spokeswoman said the company spoke to clinicians including anesthesiologists, respiratory specialists and ICU doctors treating covid-19 patients at several major hospitals to confirm the device’s usefulness for the current situation.

“This isn’t about a feature comparison. This is about trying to save lives when no other ventilators are available,” said Ford spokesperson Michael Levine.

Ford tapped its network of thousands of automotive suppliers over the past week to ask them to retool their manufacturing to create components, Ford’s Price said. All but one component could be purchased inside the United States, speeding the process. And by Tuesday, Ford had finished mapping the ventilator and detailing every step of the manufacturing process.

Ford has been outfitting its Rawsonville battery plant outside of Detroit, which is serviced by the Local 898 United Auto Workers union. That union is known for “skilled tradesmen” capable of quickly adapting the factory floor for new products. Since at least Wednesday, those workers have been changing its conveyor system, modifying tools and other equipment to make ventilators. Local 898 members have volunteered to fill all 500 positions on the project.

The adaptations haven’t been just about the manufacturing. Ford’s engineering team maintains social distancing by working six feet apart and wearing face shields. It also has a backup team in case someone on the A team comes down with the virus.

The chance to make ventilators to help covid-19 patients is one of the most exciting things to happen at Ford’s battery plant in years, said a union member who has worked in the plant for more than 20 years and spoke on the condition of anonymity because he was not authorized to speak publicly. “We do a ton of work for a ton of different plants, but it just doesn’t feel the same as these heavy-duty jobs like machining and forging,” the worker said, recalling the now-outsourced jobs that required “giant ovens” that melted metal.

The battery and component work they do there, he said, can easily be packed up and moved somewhere else.

“We have some of the best tradesmen in the UAW,” the worker said. The ventilator effort would put their talents to an even more meaningful use, he said.

Meanwhile, General Motors’ efforts started just a few days before Ford’s, on March 17. That day, GM chief executive Mary Barra got a call from a representative of Stop the Spread, a nonprofit to combat the coronavirus. The representative asked Barra if there was anything the automaker could do to aid in the relief effort, according to people involved in the process, who spoke on the condition of anonymity so that they could speak candidly about the situation.

Barra said she would assign a team to the task. Stop the Spread connected Ventec, the small Washington-based company, with GM. Meanwhile, GM announced on March 18 it was shutting down car production.

The next day, on March 19, Philip Kienle, GM’s vice president of North American Manufacturing and Labor relations, joined three other manufacturing leaders to fly to Seattle for a meeting at Ventec’s headquarters in Bothell, Wash., to discuss how they could scale the operations through GM’s manufacturing process and supply chain.

“From the very first call between the GM and Ventec teams, the partnership went from zero to sixty and we have had our foot on the accelerator ever since to create as many critical care ventilators as quickly as possible,” said Ventec’s chief strategy officer Chris Brooks in a statement.

GM secured suppliers’ commitment for all the parts to build their Ventec ventilator, as it broke down its device and came up with an efficient manufacturing plan.

The company chose its 2.6 million-square-foot Kokomo precision electronics plant with a special capability: a “clean room” HVAC system that sucks out dust. The plant is staffed by about 300 workers. GM says it will need a thousand to complete the job.

It became clear that not enough staff, who were sent home with pay, would volunteer to cover the need for help. So the company has taken to the local community to recruit workers for the effort.

That also means GM is developing a training program simultaneously while engineers figure out how to best put together the components.

In Kokomo, GM’s prototypes for testing and validation are expected to be ready next week. Once those have been properly tested, the ramp-up process will accelerate: 10 a day, 30 a day, 50 a day, with a plan to start shipping some ventilators by mid-April. Eventually, by mid-May or early June, GM expects to be producing 10,000 a month.

The University of Washington’s IHME projects the nation’s ventilator need will have fallen to 2,000 by June 1.