TORONTO — Manufacturing giant 3M said Monday it has an agreement with the Trump administration that will allow the company to continue to export N95 protective masks to Canada and Latin America amid the coronavirus pandemic.

The company said the U.S. government and 3M MMM, -0.63% have a plan to produce 166.5 million masks over the next three months to support health-care workers in the United States. They will primarily come from its manufacturing facility in China.

President Donald Trump had used his authority under the 1950 Defense Production Act to stop exporting such masks, also known as respirators. The move to block such masks, which are crucial in protecting healthcare workers on both sides of the border from the virus that causes COVID-19 disease, outraged many officials in Canada.

“3M and the Administration worked together to ensure that this plan does not create further humanitarian implications for countries currently fighting the COVID-19 outbreak,” the company said in a statement. “The plan will also enable 3M to continue sending U.S. produced respirators to Canada and Latin America, where 3M is the primary source of supply.”

3M issued a statement last week saying that could have “significant humanitarian implications” for health-care workers in Canada and Latin America. The company had said possible retaliation by other nations could actually lead to fewer of the masks being available in the U.S.

The premier of Canada’s most populous province, Ontario, said earlier Monday that U.S. officials had stopped 3 million masks from getting to Ontario from 3M, though he said was told that 500,000 of them were being released Monday.

Ontario Premier Doug Ford said that he was hopeful Canada would get an exemption and that he felt better about that after speaking with U.S. Trade Representative Robert Lighthizer.

“It is absolutely critical that they except Canada from this presidential order,” Ford said.

Ford said delays in global shipments and recent restrictions at the U.S. border had left Ontario with about a one-week supply of critical protective equipment.

Canadian Deputy Prime Minister Chrystia Freeland said the flow of medical equipment benefits both countries and needs to continue.

State Department spokeswoman Morgan Ortagus said in a statement that U.S. Secretary of State Mike Pompeo had spoken to Canada’s foreign minister about it and “reiterated the United States’ desire to work with Canada to ensure the viability of international supply chains for crucial medical supplies and personnel, while also meeting the needs of regions with the most severe outbreaks.”

Canadian Prime Minister Justin Trudeau has noted Canada supplies the U.S. with many supplies for the medical sector, including pulp for surgical-grade N95 masks, test kits and gloves. Canadian nurses also work in the U.S.