President Trump’s plan to build a wall the length of the U.S. border with Mexico will cost an estimated $15 billion to $25 billion, but that price tag will be a fraction of the final total cost of this monumental mistake.

While the wall resonated as a campaign pledge, it will do nothing to fix illegal immigration while causing widespread damage to America’s broader economic and foreign policy interests — damage that is already mounting.

As a means for stopping illegal entry to the United States, a big wall is superfluous. Over the last 25 years, the United States has dramatically increased the number of Border Patrol agents at the border. Secure fencing already blocks 650 miles of the most traversed sections of the border, mostly through the desert southwest.

Sneaking across the border is more expensive and difficult than ever.

Meanwhile, in Mexico, falling birthrates and an improving economy have reduced the northward flow of workers to such a degree that net migration has turned negative: More Mexicans are leaving the United States each year than are arriving. The fastest growing source of illegal immigration is now from Asia, and most of those immigrants arrive legally but simply overstay their visas. No wall — no matter how high — will keep them out.

If built, a 1,900-mile wall along the Mexican border would trample the private property rights of American citizens who live along the border and would scar sensitive national parkland. About half the wall would need to follow the Rio Grande, posing an expensive engineering challenge and effectively cutting off American access to the river, turning U.S. territory into a virtual no-man’s land.

President Trump’s rash insistence that Mexico pay for the wall is poisoning our relations with our southern neighbor. It has led to the cancelation of a visit to Washington by Mexico’s President Enrique Pena Nieto. It’s fueling anti-American feelings among Mexico’s 128 million citizens and across its political spectrum.

In the 1980s, Mexico turned away from its failed policy of import substitution to embrace the North American model of deregulation, open markets and economic integration. The result has been mutual economic benefits for both our countries, a rising Mexican middle class, opportunities for its young workers, a stable economy after decades of boom and bust, and a clean, competitive multiparty democracy.

The North American Free Trade Agreement has been at the center of the transformation. Mexico is the second-largest market in the world for U.S. exports. The imports we buy from Mexico on average contain American parts that make up 40 percent of their value. The U.S. automobile sector is thriving in large part because of integration of production with Mexico and Canada, leading to record output and exports. A border wall and a threatened 20 percent tariff on Mexican imports to pay for it would put those economic gains in jeopardy.

Thirty years of progress in bringing our two nations closer together are now being squandered. If the border wall is actually built, its main accomplishment will be to stand as an ugly and fitting monument to a fit of xenophobic folly.