Mexican President Enrique Peña Nieto told an assembly of top diplomats last week that “Mexico of course will not pay” for Donald Trump’s wall. His predecessor, former president Vicente Fox, put it more bluntly in a tweet storm last week, declaring: “TRUMP, when will you understand that I am not paying for that [f----n] wall.”

They are both wrong. Trump absolutely can make Mexico pay. And the answer lies in a provision of the corporate tax-reform plan House Republicans are planning to take up after Trump’s inauguration — the so-called “border adjustment.”

Trump criticized the border adjustment this weekend, telling the Wall Street Journal “Anytime I hear border adjustment, I don’t love it.” Here is why he should: It would force Mexico to give us every penny we need to pay for the wall, and then some.

The House Republicans’ plan would lower the corporate tax from 35 percent to 20 percent and apply the tax based on the location of consumption rather than the location of production. It would do this through a “border adjustment” that exempts exports while taxing imports. Under the plan, all imports coming into the United States would be subject to the 20 percent tax, but exports would have the tax refunded — making them tax-free.

Supporters see it as a way for Trump to follow through on his campaign pledge to tax imports and support exports without resorting to tariffs that would provoke a massive global trade fight. Right now, more than 160 countries around the world have a “border adjusted” value-addedtax (VAT). So unlike tariffs, a border adjustment should be able to pass muster with the World Trade Organization.

Here is where the wall comes in: As economist Martin Feldsteinexplains, the border adjustment would raise hundreds of billions in tax revenue — not from U.S. consumers or corporations, but from our foreign trading partners. Under the border adjustment, the United States would refund the tax on exports and charge it on imports — so the net revenue would be negative if we had a trade surplus, and positive if we had a trade deficit. Because the United States has a trade deficit, Feldstein calculates the border adjustment would bring in about $120 billion a year, or $1 trillion over a decade.

One of the countries with whom we have a large trade deficit is . . . Mexico. The U.S. trade deficit in goods with Mexico was $60.7 billion in 2015 and is expected to be around $65 billion in 2016. So if Mexican imports are taxed at a rate of 20 percent, the United States would raise about $13 billion a year in revenue from Mexico via the border adjustment.

How much will the wall cost? Trump has put the price at between $8 billion and $12 billion. Others have suggested it could be higher, between $15 billion and $25 billion. Either way, the full cost would be more than covered in one or two years by the $13 billion in annual revenues we would collect from Mexico. Indeed, over several years, the border adjustment could force Mexico to pay not only for the wall, but for the costs of a lot of Trump’s other border-security measures — from expediting the deportation of criminal aliens to hiring more screeners to conduct “extreme vetting.”

In other words, the border adjustment would allow Trump to keep two major campaign promises at once — he could tax imports and subsidize exports, while forcing Mexico to pay for the wall.

And here is the really brilliant part: There is nothing Mexico could do about it. Mexico might find ways to retaliate over specific measures targeting it — such as increased fees for visas or taxing remittances. But with the border adjustment, Mexico would have no recourse to complain, because such a measure is global in nature and would affect all U.S. trading partners equally. Plus, how could Mexico object when it is one of the 160 countries around that world that has a “border adjusted” VAT of its own?

So yes, thanks to the border adjustment, Donald Trump can indeed make Mexico pay for the BLEEP-ing wall. And Mexico would be powerless to stop him.

Mr. President-elect, what’s not to love?

Read more from Marc Thiessen’s archive, follow him on Twitter or subscribe to his updates on Facebook.