WASHINGTON — The United States agreed Friday to lift its tariffs on industrial metals from Mexico and Canada, clearing a major obstacle to congressional passage of President Donald Trump’s new North American trade deal.

The bargain calls for Mexico and Canada to adopt tough new monitoring and enforcement measures to prevent subsidized Chinese steel from being shipped to the United States via their territory. In return, the United States will lift its tariffs in 48 hours.

In remarks to the National Association of Realtors, Trump said the tariffs deal should pave the way for lawmakers to ratify the new United States-Canada-Mexico Agreement. “That deal is going to be a fantastic deal for our country. Hopefully Congress will pass the USMCA quickly,” he said.

Trump’s announcement, which came as U.S. negotiators try to revive stalled trade talks with China, capped a blur of action showcasing his trade policy revolution.

Few weeks have shown more clearly how the president rejects the “free trade” gospel long favored by both Democrats and Republicans.

“He thinks the government needs to be much more active in making decisions about cross-border trade flows, which is a departure from his predecessors,” said John Veroneau, deputy U.S. trade representative under President George W. Bush.

The businessman president, who rails against regulation and taxes, nonetheless backs the active use of government power to counter what he sees as market distortions caused by other nations’ trade barriers and industrial policies.

Even as Trump ended the metals tariffs, he secured agreement from Canada and Mexico to permit their return in the event of a meaningful “surge” in shipments “beyond historic volumes.”

If that occurs, Canada and Mexico have agreed to confine any retaliation to steel and aluminum, rather than the array of products from whiskey to motorboats they targeted.

Trump announced the tariffs plan only hours after directing Robert Lighthizer, his chief trade negotiator, to seek agreements with the European Union and Japan to limit their auto exports to the United States — a move toward what economists call “managed trade.”

Earlier in the week, he took the first step toward imposing tariffs on all Chinese imports — which is expected to raise the price of consumer goods including computers and televisions — and he put one of China’s most prominent companies on an export blacklist.

“It was a clarifying week on a number of fronts,” said Veroneau, a partner at Covington & Burling.

Citing national security considerations, Trump last year imposed tariffs on steel and aluminumin response to what the United States called a flood of Chinese commodities onto global markets. The administration blamed Chinese overproduction for depressing global steel and aluminum prices, driving many U.S. mills out of business.

In talks over eliminating the tariffs, U.S. officials tried to get their North American partners to accept quotas on steel and aluminum shipments. But both Canada and Mexico, neighbors and close U.S. allies, had bristled at being labeled national security dangers and rejected that demand.

Canadian Prime Minister Justin Trudeau spoke with Trump Friday, their third such call in about a week. They discussed the tariff issue, as well as the USMCA agreement, according to a Canadian readout of the call.

Appearing Friday at a steel plant in Hamilton, Ontario, Trudeau called the end of the U.S. tariffs “terrific news.”

Likewise, a statement from the office of Mexican President Andrés Manuel López Obrador said: “Mexico has reached a highly satisfactory agreement with the United States as a result of the dedication, will and vision of both countries.”

By avoiding quotas, the deal announced Friday marks a win for the two countries while also addressing Trump’s worries about Chinese steel and eliminating a major stumbling block to Congress approving the replacement to the North American Free Trade Agreement, the president’s signature trade deal.

Senate Republicans, including Sen. Charles Grassley of Iowa, the powerful Finance Committee chairman, had said they would not approve the deal while the tariffs were in place.

Iowa farmers were among the casualties of Mexican retaliatory tariffs, which cut deeply into U.S. agricultural exports. The Mexican tariffs, and similar Canadian levies, also are being eliminated.

The USMCA still faces an uphill road to ratification, with House Speaker Nancy Pelosi, D-Calif., insisting the deal be reopened to add tougher enforcement provisions for its labor requirements.

Announcement of the tariffs deal came hours after the president gave the European Union and Japan six months to agree to limit their auto shipments to the United States or face the threat of U.S. tariffs.

Trump’s decision followed a Commerce Department report that concluded rising imports of foreign autos and auto parts threatened U.S. automotive research and development capabilities and thus impaired national security.

”American-owned automotive R & D and manufacturing are vital to national security,” Commerce Secretary Wilbur Ross found.

Some foreign auto companies said the president’s stance overlooked their U.S. factories and research centers. Toyota Motor North America employs 475,000 Americans at three research institutes and 10 plants.

”Today’s proclamation sends a message to Toyota that our investments are not welcomed, and the contributions from each of our employees across America are not valued,” the company said.

The president threatened last year to hit foreign cars and parts with a 25 percent tariff but agreed to defer a decision while negotiations proceeded. Those talks have made little headway.

Friday’s auto tariffs announcement sets the clock running on another key trade issue at a time when Lighthizer is engaged in trying to reset trade relations with China and secure congressional approval of the USMCA deal.

”If agreements are not reached within 180 days, the president will determine whether and what further action needs to be taken,” a White House statement said.

Trump’s claim that foreign autos represent a national security threat was greeted with derision by some Republicans on Capitol Hill as well as industry figures.

”Toyota Corollas and Volkswagen Beetles do not pose a national security threat,” said Sen. Patrick Toomey, R-Pa.

The autos decision signals the president’s support for a system of managed trade, with the federal government setting limits on the amount of foreign products that American businesses and consumers may buy rather than allowing market forces to operate unfettered.

The approach harks back to the voluntary export restraints the U.S. negotiated with Japan during an earlier period of trade tension in the 1980s.

”I don’t think there is any more doubt about it, the president is far more attracted to managing imports than expanding exports,” said Rufus Yerxa, president of the National Foreign Trade Council. “The entire U.S. auto and auto parts sector understands why it needs a global strategy, but the president clearly prefers 1980s style protectionism.”

Unlike his confrontation with China, Trump is virtually alone in favoring tariffs on all imported cars. The Automotive Policy Council, representing the Big Three American automakers, said Friday that tariffs “would weaken global competitiveness and invite retaliation from our trading partners, which could harm jobs and investment in the U.S.”

John Bozzella, president of Global Automakers, representing foreign carmakers operating in the United States, added: “No automaker or auto parts supplier asked for this ‘protection.’ We are headed down a dangerous and destructive course.”

The industry’s major union, the United Auto Workers, has supported “targeted” tariffs. But with members in Canada, the union does not back the president’s global approach, which would interfere with border-crossing North American supply chains.

The United States imported passenger vehicles worth $191.7 billion last year, up 15 percent from 2014, according to the International Trade Administration.

Foreign companies supplied the U. S. with an additional $158.8 million of parts, up 9.4 percent over the same period.

The president last year rejected the EU’s offer to drop its auto tariffs to zero if the United States would do likewise. The United States maintains a 2.5 percent tariff on foreign cars, lower than the EU’s 10 percent levy.

But the United States imposes a 25 percent tax on imported light trucks, the most profitable market segment for American companies.

With the auto tariff decision deferred and a key USMCA obstacle defused, the president is free to concentrate on the stalled talks with China. One week after breaking down in a dispute over U.S. complaints that China had reneged on its commitments, no dates for the resumption of bargaining have been announced.