Tariffs should be a last resort to correct other countries’ unfair trade policies.

They must not be used for political purposes or to shift blame for domestic failures. But that’s what President Donald Trump is doing by threatening Mexico with tariffs if it doesn’t support his hard-line stance on immigration.

Opening another front in America’s trade war is foolhardy. Tariffs now imposed on China are enormously costly, with no resolution to that dispute in sight. But an argument can be made that China’s record of intellectual-property theft and other harmful trade practices justifies an aggressive response.

Mexico, in contrast, is a valued trading ally that has been working cooperatively to update the North American Free Trade Agreement. Then Trump last week abruptly threatened to punish the country with devastating tariffs unless it does the impossible and stops the tide of Latin Americans seeking better lives in the United States.

This is a new twist on his absurd campaign promise to get Mexico to pay for a border wall.

The United States does have an immigration problem, but it’s largely our fault. Congress and a series of presidents have failed to successfully reform our broken immigration policy, creating uncertainty for immigrants, and employers and fear, confusion and anger for citizens. It remains a political piñata for the right and left.

Trump makes it worse by prioritizing symbolic gestures, like the wall and now tariffs, over the harder work that’s required: negotiating reforms and reducing backlogs in the legal system handling the flow of asylum-seekers and immigrants entering legally and illegally. Bureaucratic failings, combined with mean-spirited and race-baiting policy direction from the White House, has led to abhorrent outcomes like thousands of children being separated from families with no centralized system to track or reunite them.

Hurting Mexico economically does the opposite of what Trump wants. When Mexico’s economy grows and provides more and better jobs, fewer migrants cross the border looking for work. Tariffs would likely cause a recession there, according to a Reuters poll of market analysts. If Trump wants to reduce the northward flow of immigrants, he should do more to help Latin America nations improve their economies, stability and human rights.

Washington is particularly vulnerable to a trade war with Mexico, the largest export market for its apples. Things were looking up last month when the U.S. agreed to drop steel and aluminum tariffs on Mexico, and it responded by dropping a 20 percent apple tariff. Then Trump’s immigration tariff threat came out of right field.

One Trump goal is particularly troubling: Forcing Mexico to take Central American asylum-seekers coming to the United States. That undermines our nation’s promise as a place of refuge and opportunity. It’s also wrong to block asylum-seekers from reaching our border by having them stay in Mexico, a poorer country with severe human-rights problems of its own. The approach is rightly being challenged in federal court; it should be vetted by the judiciary and not forced with tariff threats.

Americans should see these threats for what they are: bullying and distractions from our failure to enact meaningful, compassionate immigration reform and constructive, deliberate foreign policy.