Whether by foresight or mere good fortune, U.S. banks have reduced their exposure to Mexico just as tension between the two countries is heating up.

Over a two-year period, domestically based financial institutions cut their dealings with Mexico by 13 percent, according to consulting and analysis firm SNL Financial. The 11 U.S. banks with the most Mexico exposure have a combined $96 billion in cross-border claims.

By far the bank with the most Mexico-related business is Citigroup, which has been working to pare its $65.8 billion in exposure. That number represents a 23 percent decline from the third quarter of 2014 through the same period in 2016, SNL reported.

The moves come as President Donald Trump puts what had been campaign rhetoric into action.

During his successful candidacy, he promised to build a wall along the southern U.S border to keep out illegal immigrants. He has threatened to slap a 35 percent tariff on Mexican imports unless the country agrees to renegotiate the North American Free Trade Agreement, and he is considering a border tax aimed at increasing U.S. exports and reducing imports.

Trump's saber-rattling resulted in Mexican President Enrique Pena Nieto canceling a meeting scheduled between the two leaders for next Tuesday.

Though it has reduced its cross-border holdings, Citigroup officials of late have expressed an interest in continuing investment in Mexico.