At 3:38 a.m. Wednesday morning, the New England Patriots’ team plane departed from an unusual locale: Shenzhen, China. On board the Boeing 767, in the cargo hold that used to be home to Tom Brady’s duffel bags, were 1.2 million N95 masks bound for the U.S.

Video and pictures of the event show workers in masks and full-body suits at Shenzhen Bao’an International Airport loading box after box of the scarce and valuable personal protective equipment onto a red, white and blue plane emblazoned with the Patriots logo and “6X CHAMPIONS.”

The plane was permitted to be on the ground in China for a maximum of three hours, people familiar with the matter said, and the crew was required to stay on the plane while a ground crew loaded the cargo. It took 2 hours and 57 minutes. On Thursday, that plane landed somewhere more familiar: Boston Logan International Airport.

The story of this remarkable delivery, based on documents and interviews with people involved in the operation, is a window into the frenzied scramble by states to acquire life-saving equipment needed to battle the coronavirus pandemic. The process involves not just tracking down goods, but also tapping intermediaries and calling in favors to navigate a dense global bureaucracy that the pandemic has virtually paralyzed.

As the country and the medical system have grappled with responding to the virus, one of the greatest pressure points has been the shortage of N95 masks, critical equipment to protect against its spread. Demand has significantly outpaced supply, putting health-care workers and patients at even greater risk.