Bernie Sanders warned — nearly five years ago — that an impending trade deal with Panama would allow rich Americans to establish offshore tax shelters.

Sanders’ dire prediction is particularly germane now, in light of leaked documents that show thousands of accounts allegedly linking hidden funds with tax evaders across the world.

Business and political heavyweights like Russian President Vladimir Putin, Iceland Prime Minister Sigmundur David Gunnlaugsson and leaders of world soccer body FIFA have been linked to the shady money.

So far, no big-name Americans have been outed. But news outlets and auditors have so far only scratched the surface of the massive document leak.

Sanders has based his entire Democratic presidential campaign, against front-runner Hillary Clinton, on issues of economic disparity.

“Panama’s entire annual economic output is only $26.7 billion a year, or about two-tenths of 1 percent of the US economy. No one can legitimately make the claim that approving this free trade agreement will significantly increase American jobs,” Sanders said on the Senate floor in October 2011.

“Then why would we be considering a stand-alone free trade agreement with this country? Well, it turns out that Panama is a world leader when it comes to allowing wealthy Americans and large corporations to evade US taxes by stashing their cash in offshore tax havens. And the Panama Free Trade Agreement would make this bad situation much worse.”

The agreement was eventually approved and signed into law by President Obama.

Here’s what the leak reveals about how the rich and famous are gaming the system: