DETROIT — Ford Motor Co.’s pivot from transmissions to face masks at a Michigan plant began with an executive’s late-night text to a colleague. It quickly morphed into a complex, intercontinental scramble to secure and ship machinery and materials — which was nearly thwarted by a flock of unfortunate birds.

It’s the stuff of a Hollywood action thriller, even for a century-old automaker that has done logistical backflips in recent years to keep vehicle production from being disrupted by supplier fires and complex plant renovations.

“We have an amazing logistics team,” Adrian Price, director of global core engineering for vehicle manufacturing, told Automotive News. “When we have issues, that team just swings into action, and they’re able to work magic.”

Ford’s decision to mass-produce face masks at its Van Dyke Transmission Plant north of Detroit is part of a larger effort to make medical equipment for health care workers and COVID-19 patients. But in addition to helping hospitals fight the coronavirus outbreak, the endeavor aims to make enough masks to protect Ford’s own factory workers to facilitate safely restarting vehicle production.

The idea came from China, where employees at joint venture Changan Ford had begun making masks for workers there. Price learned of the mask production March 24, a few days after being named manufacturing lead for Ford’s Project Apollo, an ad hoc scramble to build ventilators, respirators and plastic face shields in the U.S.

He shot a text to colleagues in China one evening on WeChat, asking about the feasibility of face mask production in the U.S. as well. A half-hour later, he was on the phone with a number of officials, including the CEO of Ford Taiwan, as Changan Ford had obtained its mask-making machines from that island.

By the time Price woke up the next morning, the team in China had located the necessary equipment: 10 machines, roughly 20 to 25 feet long, each capable of rolling out 100,000 masks a day. Ford had the first two available machines quickly delivered to its Lio Ho Motor Co. joint-venture plant in Taiwan. The machines were then trucked to the closest airport, and they arrived at the Michigan plant March 31, along with some initial material.

Ford chose the plant, which supplies the Explorer, Escape and other vehicles, because of its Class A clean room designed for handling delicate transmission parts. The equipment was up and running by April 3 — but not for long.

Face masks are made up of six different materials: an inner layer, a filter, an outer layer, a soft metal nose piece, ear straps and side hemming. As Ford was coordinating the machine deliveries, it was simultaneously searching for a supplier with material available in bulk. It found one in Shanghai.

With no commercially available way to transport the fabric to the U.S., Ford planned to fly it over on a Boeing 747, one of 22 planes its logistics team had chartered from China to the U.S. in February, when the virus was beginning to spread, for future flights.

But shortly after the jet took off from Shanghai, it struck a flock of birds and lost an engine, forcing the pilot to return to the airport. The next flight out wasn’t for another week.

“I was really worried,” Price said. “My concern was that we’d be sitting here having done all this work in such a short time and not be able to run the machines because we didn’t have material. Once you lose a 747, it’s hard to find a replacement.”

But that’s exactly what Frank Mosquera, Ford’s behind-the-scenes logistics whiz, did. Within five hours, according to Price, Mosquera’s team located a Federal Emergency Management Agency flight from Shanghai to Columbus, Ohio. After quick negotiations, FEMA officials agreed to make room for Ford’s cargo, and the masks were en route.

By the time the plane touched down in Columbus, Ford had a helicopter ready to ferry the material for the final 90-minute leg of its journey, directly to the plant.

Since then, Ford Taiwan sent workers to speed production of the other eight machines at the supplier making them. They have been able to pull ahead delivery by multiple days. Ford expected to have almost all of the machines up and running by early this week.

Price said Van Dyke Transmission should be able to produce millions of masks per week, each stamped with the script Ford wordmark.

“One of the powers of Ford Motor Co. is our ability to bring together incredibly talented professionals in all these fields to work together as one Ford,” Price said. “That’s the embodiment of everything we do from a culture standpoint. It makes me feel tremendously proud of our team.”