BOSTON (AP) — Massachusetts Gov. Charlie Baker found himself in need of an assist to help the state fight the coronavirus pandemic.

He called on the New England Patriots.

The team’s private plane landed in Boston from China on Thursday evening carrying more than a million masks critical to health care providers fighting to control the spread of the virus. Members of the Massachusetts National Guard met the plane and offloaded the containers of masks onto waiting trucks for transport to warehouses for distribution.

Baker secured the N95 masks from Chinese manufacturers but had no way of getting them to the U.S. He reached out to Patriots owner Robert Kraft, who loaned the Boeing 767 painted in the team’s colors and logo that is usually used to carry the team to and from NFL games.

Baker detailed the joint venture in a news conference Thursday, at one point getting emotional as the thanked the Kraft family for their assistance.

“The Krafts were terrific," the Republican governor said. "They were a phone call away and immediately went to work on the logistics associated with this and did not stop until they could make it happen. This was a total team effort on every level.”

Kraft Sports and Entertainment chief operating officer Jim Nolan said in an interview on Patriots.com radio that the Chinese government didn’t officially sign off on the trip until March 27. Nolan said the hurdles included legal logistics that were only cleared thanks to cooperation involving multiple state, U.S. and international entities.

Gene Hartigan, co-chair of the U.S.-China Partnership Committee, a Massachusetts-based nonprofit that develops investment from China into Massachusetts and other parts of the country, said he helped get the mask procurement proposal to Ambassador Huang Ping, the consul general of China's Consulate in New York.

The necessary paperwork had to go through several channels, he said, including the state department and an aviation organization in the Midwest that collected passports for everyone who would be on Kraft's plane. Those passports were flown to New Jersey, and with a New Jersey state police escort, were brought to the consulate in New York early Sunday morning.

"The ambassador opened up the consulate and within two hours, all the visas were issued to all of the passports. The ambassador also cleared, through the foreign ministry, a clearance for quarantine so that none of the flight crew would be expected to spend any more than the time there on the ground in China. They also cleared a flight path. So when the plane left Anchorage after refueling, it flew directly into Shenzhen. They picked up the masks, which were loaded by a Chinese ground crew. They were on the ground for two hours and 57 minutes, took off and headed back to Alaska. Their final stop was Logan Airport Thursday evening," Hartigan said.

Hartigan explained the need for secrecy.

"These are not good times for trying to structure something. But we were able to work through the difficulty. We were able to make things happen," he said. "And there were two things that were critical. One, we had a foreign aircraft that was coming in with a lot of waivers being provided. The second was no one on the aircraft could get off the aircraft."

Nolan said that the Chinese technology company Tencent was a huge help in the process. It agreed to gather the masks, got them through the inspection process, stayed with them to ensure their security and eventually their movement on to the Patriots’ plane.

“This isn’t in their wheelhouse, but they thought it was the right thing to do,” Nolan said.

There was little margin for error once the airplane arrived in China, which granted the Patriots three hours to fill the plane with the masks.

Nolan said 300,000 of the masks will also be going to New York to help medical personnel there. Baker said Rhode Island will also receive some of the masks.

Patriots running back James White said in a conference call Thursday that he wasn’t surprised Kraft stepped up to help.

“As soon as you step into the building, you see how much the Kraft family does helping out not only the Boston community but the community across the world and it makes you want to help others,” White said.

WGBH News' Mary Blake contributed to this report.

Associated Press writers Steve LeBlanc and Mark Pratt contributed to this report.