When word got out in January 1848 that gold had been discovered at Sutter’s Mill in Coloma, California, near Sacramento, it triggered the famous California Gold Rush, which in a few short years brought some 300,000 fortune seekers to the territory, whose population at the time was just 155,000, most of them Native Americans.

President Trump’s threat to impose a tariff on Mexican imports to pay for the border wall he’s proposed could have a similar stampede effect: causing more, not fewer, illegal immigrants to rush to the United States. It will take years to build a border wall; it will take little more than talk to trigger a potential border-wall rush.

If ever there was a policy proposal that could produce a result that’s the opposite of what’s intended, this is it.

The reason is simple: A 20 percent tariff on Mexican imports would be a disaster for the Mexican economy, destroying jobs and driving many of the jobless to seek work—legally or illegally—in the United States.

Mexico currently sends more than 80 percent of its exports to the United States: cars, auto parts, machinery, electrical equipment, medical instruments, oil, and fresh and processed fruits and vegetables, among other goods. In all, Mexico exported more than $316 billion in goods and services to the United States in 2015, the Office of the U.S. Trade Representative reported.

A 20 percent tariff would crush some of these industries.

The United States would suffer, too. Mexico is our third-largest trading partner, importing more than $267 billion in U.S. goods and services in 2015. Even if Mexico does not reciprocate with tariffs of its own, the United States would also be hurt. Just not as much as Mexico, since U.S. exports to Mexico account for only about 13 percent of total U.S. exports—not 80 percent.

The threatened 20 percent tariff is huge. By comparison, the simple average tariff rate on Mexican goods was around 4 percent prior to implementation of the North American Free Trade Agreement (NAFTA); it has declined to about 0.5 percent today.

Since the recent great recession, the Mexican economy has expanded at an average rate of 3.2 percent per year. The U.S. economy, by comparison, has grown an average of 2.1 percent per year.

The growing Mexican economy increased job opportunities, pushing the unemployment rate down to 3.4 percent in December 2016. It also triggered a period of reverse migration, as tens of thousands of Mexicans living in the United States returned home.

Since 2009, in fact, the number of Mexicans returning home exceeded the number of Mexicans entering the United States by approximately 140,000, according to the Pew Research Center.

A 20 percent tariff would put the brakes on Mexico’s expansion and likely reverse the migratory trend, as Mexicans, both legally and illegally, seek economic opportunities in the United States.

Contrary to what some in the White House seem to be suggesting, the threatened tariff would not be paid exclusively by Mexicans. It would be paid by Mexican exporters, American consumers and businesses, and the purchasers of U.S. exports containing components made in Mexico.

The United States will be more prosperous if it has neither a physical wall impeding the movement of people nor an artificial wall—in the form of a tariff—impeding the flow of goods.

If President Trump follows through on his promise to finance the building of a Mexican border wall with tariffs, it will not only make U.S. citizens poorer, it will also fail to achieve his stated goals.

U.S. citizens will still end up partially paying for the wall and the flow of immigrants trying to enter the United States illegally—a flow his wall is intended to impede—will likely increase.