The Trump administration has agreed a deal with the US manufacturer 3M to import more than 166m respirators from China over the next three months and allow 3M to continue exporting its US-made respirators.

The agreement breaks a deadlock which resulted in Washington stopping nearly three million of the specialized masks from being exported to Ontario, stirring fears that Canada’s most populous province would run out of supplies for medical staff battling coronavirus by the end of the week.

Donald Trump, who had lambasted 3M over the weekend, had warm words for the company on Tuesday, following the agreement, and its chairman and CEO, Mike Roman, offered praise for the president.

“I want to thank President Trump and the administration for their leadership and collaboration,” Roman said in a written statement. “These imports will supplement the 35 million N95 respirators we currently produce per month in the United States.”

Under the plan, 3M will import 166.5m respirators (masks which form a seal over the mouth and nose and offer much greater protection than surgical masks) from its factories in China, over the coming three months.

Meanwhile, the 3M statement said: “The plan will also enable 3M to continue sending US produced respirators to Canada and Latin America, where 3M is the primary source of supply.”

The clash with 3M and Canada began on Thursday when Donald Trump invoked the 1950 Defense Production Act giving the government “any or all authority” to stop 3M exporting N95 respirators to Canada and Latin America.

The masks, which filter out 95% of airborne particles, are seen as a critical tool for frontline healthcare workers in the fight against Covid-19.

But as supply shrinks, countries and local governments are locked in a desperate battle to access whatever equipment is available.

At a press conference on Monday, Ontario’s premier, Doug Ford, said the 500,000 masks had been cleared for release, but nearly three million masks were intercepted by US officials at 3M’s South Dakota Facility.

“We know that the US isn’t allowing supplies across the US border,” Ford said. “The hard truth is, our supplies in Ontario are getting very low and the more new cases we get, the more demand there is on our resources.”

3M initially resisted the president’s executive order, warning in a statement the move would have “significant humanitarian implications” for countries desperate for safety equipment.

Over the weekend, Trump harshly criticised the company, warning it would have “a big price to pay”.

“We need the masks. We don’t want other people getting it,” Trump said in a Saturday briefing to reporters. “That’s why we’re instituting [the] Defense Production Act. You could call it retaliation because that’s what it is: it’s a retaliation. If people don’t give us what we need for our people, we’re going to be very tough.”

”.

As Ontario scrambles to source new equipment, Ford said the province was “desperately” counting on orders placed through the federal government’s bulk purchasing program to bridge its short-term needs until a sustainable supply can be found.

The order from Trump threatened to do serious damage to the close relationship between the two countries.

Speaking at his daily press briefing on Monday, Justin Trudeau said his government would not implement retaliatory measures, instead relying on diplomacy to end the impasse.

“There are very productive conversations ongoing and we expect those shipments to be delivered,” said the prime minister.

Trudeau said the foreign minister, François-Philippe Champagne, had spoken earlierwith the US secretary of state, Mike Pompeo – but declined to provide additional details about the halted shipment.

A US readout from the call said Pompeo “reiterated the United States’ desire to work with Canada” to ensure Canada had access to critical equipment while also ensuring hard-hit areas in the US had a supply of equipment.

But Trudeau also cautioned Canada’s relationship with the United States is a “two-way street” – a reference to the hundreds of healthcare workers in southern Ontario that cross into Michigan each day.

In addition to frontline workers, Canada also supplies US companies with the primary materials needed to construct the specialized equipment, including a medical-grade fabric at a pulp mill in British Columbia. The mill, Harmac Pacific, said it had no plans to halt exports to the United States.

Despite the prime minister’s promise of a resolution with his American counterparts, provincial leaders are already looking to the future.

Quebec-based AMD Medicom Inc recently signed a deal to manufacture as many as 50m surgical and N95 masks for the federal government, according to the Globe and Mail. And in Ontario, Ford said he was working with federal officials to expedite the approvals process for a new “N96” mask developed by within the province.

“Never again in the history of Canada should we ever be beholden to countries around the world or companies around the world for the safety and wellbeing for the people of Canada,” Ford said on Friday. ”I’m not going to rely on President Trump, I’m not going to rely on any prime minister or president from any country ever again.”