This is an excerpt from the newly published book Shadow Courts: The Tribunals that Rule Global Trade by Haley Edwards.

The environmental activist Jane Kleeb was driving down Highway 281 near Lincoln, Nebraska, on a gray day in January 2016, when she got a call from a reporter.

At the time, Kleeb was still riding high off of her success organizing local farmers, ranchers and environmentalists in opposition to the Keystone XL Pipeline, which would have carried petroleum products from Canada’s tar sands across the Nebraska plains to the Gulf of Mexico. Thanks to her and other activists’ efforts, President Barack Obama had announced in November 2015 that his administration would deny the Canadian company TransCanada permission to move forward with the project, ending an eight-year-long effort to get the pipeline built.

The reporter was calling to ask Kleeb about a new twist in the saga. Earlier that day, TransCanada had announced it was suing the US government for $15 billion on the grounds that Obama’s decision to block the project violated the North American Free Trade Agreement. It was the first Kleeb had heard of the suit. “I’m an organizer, so my reaction was, ‘When are the hearings? Where is this happening? Who’s the judge?’” she said recently. If TransCanada was challenging the decision in court, she wanted to be there. Could she protest on the courthouse steps? Arrange for a rally in a nearby town?

In the last 20 years, the mechanism has quietly changed, evolving into something much more powerful — and very political indeed.

But that, Kleeb learned, was not how this case would go down. TransCanada wasn’t suing the US in a US court, or in a Canadian court for that matter. Its argument would not be heard by a judge, and the merits of the case would not be considered under the auspices of either country’s legal system. There would be no protest on any courthouse steps. Instead, the case would be heard by a tribunal, manned by three private arbitrators, operating under a supranational legal system that Kleeb had never heard of. “It was totally strange,” she told me. “A foreign company can sue us in some secret tribunal? How is that even possible?”

Investor-state dispute settlement, or ISDS, first appeared in treaties in 1969. The idea behind the mechanism was straightforward: If a foreign investor believed that his host country — the nation where his company was operating had violated an international treaty by seizing or destroying his factories, oil fields or other assets, he could file an ISDS claim directly against that country. He could do that without involving his own government and without having to wait endlessly for a developing country’s corrupt or biased court system to dispense judgment.

By filing an ISDS claim, the investor would trigger the formation of a special arbitration tribunal, which would exist temporarily outside the jurisdiction of any nation’s judiciary or any international body. Its sole purpose would be to determine how much, if anything, the country owed the investor in compensation for property that had been seized or demolished. For example, in the late 1980s, the Sri Lankan government destroyed a British seafood company’s shrimp processing plant during a military raid on rebels. The British investor filed an ISDS claim, a tribunal was formed and the arbitrators determined that the Sri Lankan government must pay the company $460,000 in compensation for the destroyed plant. That was it. Case closed. The British company did not have to rely on Sri Lankan courts. The episode did not become a major diplomatic incident. The UK did not have to step in to defend its investors’ interests.

And that was the whole point: ISDS was supposed to be a cool, efficient and apolitical dispute resolution system that kept powerful nations from interfering in the affairs of weaker countries, and that offered an extra layer of protection for foreign investors operating in countries with unreliable courts. But in the last 20 years, the mechanism has quietly changed, evolving into something much more powerful — and very political indeed.

One factor in this evolution is the explosion of new claims. Between the 1960s and 2000, ISDS was almost never used. Investors brought about 40 claims total in 40 years. Since 2000, there have been 647. In 2015 alone, there were 70 new cases. That uptick is partly because there are thousands more treaties today that include ISDS. For the last 25 years, countries have signed thousands of bilateral investment treaties, and beginning in the 1990s, nearly every new trade agreement, from NAFTA and Central American Free Trade Agreement to the Energy Charter, included a chapter on investment, complete with ISDS. In 1989, there were just a few hundred agreements that included ISDS. As of 2015, there were more than 3,000.

Another reason for the explosion of new claims is that the definition of what it means for a sovereign nation to seize or destroy a foreign company’s property, or otherwise violate an investor’s property rights under the terms of an investment treaty, has become much more expansive. Investors now regularly file claims if their host government passes a new law or regulation that results in even a partial loss of a company’s property or impinges in some way on its future profits. For example, in TransCanada’s ISDS claim against the US, it argues that President Obama’s decision to cancel the Keystone XL Pipeline violated NAFTA by expropriating the company’s expected future profits.

That modern interpretation has only cropped up in the last 20 years, but it has opened up a vast new gray area. Where ISDS claims were once about seized oil fields and bulldozed factories, now they are about tax increases and environmental regulations. Where is the line between a government’s right to regulate in the public interest and a foreign corporation’s claim to its own property?

Including the mechanism in the TPP and TTIP would forever alter the global legal landscape for investors.

US trade negotiators are now working to include ISDS in as many new treaties as possible, including both of the massive new free trade deals coming down the pike. The Trans-Pacific Partnership, which President Obama signed in February 2016 and which Congress will likely ratify before he leaves office, already includes ISDS. Whether the mechanism will be inserted into the Transatlantic Trade and Investment Partnership, linking the US and Europe, is a subject of controversy. The question has already catalyzed something of an intellectual civil war in Europe, with the European Parliament recently rejecting, across party lines, any treaty that includes ISDS. Protesters opposed to it have swamped the streets in Berlin, Paris and Brussels and written hundreds of letters in opposition to what they see as the imposition of shadowy “corporate courts” that can be used to undermine laws and regulations and compromise national sovereignty.

US trade negotiators say such rhetoric is overblown. They point out that the US is already a signatory to 50 agreements that include ISDS, and that foreign corporations have only ever used it to challenge Washington 18 times. The US hasn’t yet lost a case. But experts on both sides of the debate argue those stats undersell the importance of ISDS. Including the mechanism in the TPP and TTIP would forever alter the global legal landscape for investors. The US’ 50 existing treaties are relatively tiny, representing just 10 percent of the US’ foreign direct investment; including ISDS in the TPP would increase that ratio significantly. If ISDS is included in both those trade deals, it would mean that any corporation headquartered in any of the nations that are signatories to either treaty — that includes the vast majority of companies listed under the Global Fortune 500 — could use the mechanism to challenge US laws and regulations outside of US courts, in the same way that TransCanada is today.

“I don’t think the question is whether US laws will get challenged by foreign corporations under the TPP,” Simon Lester, a trade expert at the libertarian Cato Institute, told me recently. “It’s pretty clear the US will be challenged and it will lose some of those challenges and the US taxpayers will have to pay.”

Excerpted with permission from Columbia Global Reports. All rights reserved.