MANHATTAN (CN) — Amid growing opposition to his signature treaty, President Barack Obama may face public exposure of how his corporate advisers shaped the text of the Trans-Pacific Partnership.

The administration's lawyers have spent roughly three years arguing in Federal Court that showing the treaty's corporate fingerprints to the public would threaten national security by shining a light on secret negotiations between a dozen world powers.

But U.S. District Judge Edgardo Ramos splashed cold water on those fears on Wednesday.

"[The U.S. Trade Representative] has not made a logical or plausible case that disclosure of text suggested by the private sector could harm foreign relations," he wrote in a 35-page opinion.

The decision could bring belated transparency to a treaty that has become a political lightning rod in a U.S. election season.

For more than five years, the United States and 11 other Pacific Rim nations engaged in a geopolitical dance behind closed doors that ended in a sweeping agreement in October.

The public would not see the final text for another month after the ink dried, though the terms would help determine how the signing countries conduct their affairs regarding the environment, agriculture, medicine, labor, the internet, human rights, and many other issues. Critics of the deal have noted that the treaty is so vast and sweeping that it can hardly be called a "trade" deal at all, but a bid by transnational businesses to loosen regulatory constraints. Public Citizen, a Washington-based advocacy group, notes that only six of the deal's 30 chapters relate to trade as it is traditionally understood.

Due to a confidentiality agreement among the world powers, the people of those nations could not see the TPP's drafts, and they had no voice in the future form of the agreement except through their elected representatives.

But in the United States, hundreds of unelected corporate executives — known as Industry Trade Advisory Committees, or ITACs — had a special seat at their representative's table.

Since 2013, the independent news site IP Watch has been fighting to illuminate the role of these advisers through a Freedom of Information Act lawsuit against the U.S. Trade Representative in Manhattan Federal Court.

As its name suggests, IP Watch monitors intellectual-property law, an issue commanding a 75-page chapter in the treaty's final text.

The government has cast the Geneva-based news outlet's request as nothing less than a national-security danger, which could force the United States to break their confidentiality oaths to nearly a dozen other world powers.

On Sept. 25, 2015, Judge Ramos called the threat of harm "at the very least plausible," in a ruling shielding drafts of the agreement. The United States would announce the countries reached an agreement a little more than a week later.

IP Watch has returned to court since then to argue that the matter no longer as sensitive, only to be reminded that the treaty's fate is hardly settled.

"While the conclusion of negotiations over the final text is an important milestone, the agreement will not come into force unless and until a certain proportion of participating countries approve the agreement through their domestic legal procedures," Ramos wrote. "The TPP has been a salient and fraught political question in the United States, and its entry into force is far short of a sure thing."

Both Republican and Democratic presidential candidates have come out against the TPP.

Donald Trump, in his typical bluster, immediately called it a "horrible deal" and boasted that, as a real estate tycoon, he could have done better.

After praising the agreement as a "gold standard," Hillary Clinton abandoned her former support of it in the face of a leftward challenge by Sen. Bernie Sanders, who called it a "disastrous" giveaway to Wall Street and big business.

The judge noted that the geopolitical forecast is no less stormy than the domestic one, and that releasing "snapshots" of U.S. proposals could threaten the deal overseas.

For example, Ramos noted that the other 11 nations viewing these documents could believe "that they were steamrolled by the U.S. from the start, or did not take advantage of favorable offers that the U.S. made and later retracted, or never fought hard enough for certain negotiating objectives with respect to particular topics, or made nefarious strategic decisions to favor certain special interests over others."

He added, "Such charges may be true, but they may not be, as piecemeal disclosures from different points in the negotiating process may distort the actual package of proposals that the U.S. was putting forth to its negotiating partners at any given point."

These risks convinced Ramos to mostly uphold his original ruling, except for a smaller set of documents involving the corporate advisers.

The U.S. Trade Representative did not respond to an emailed request for comment.

IP Watch's lawyer David Schulz, who directs the Media Freedom & Information Access Clinic at Yale Law School applauded the judge for his "willingness to take the rare step of rejecting as illogical an agency's national security rationale for withholding documents."

He added, "In light of the court's request for further briefing, we continue to be hopeful that additional communications will be disclosed that can shed light on the manner in which the United States' TPP positions were formulated and the role of private companies in shaping those positions."

Some have speculated that Obama will try to avoid political minefields by pushing the treaty through Congress during his lame duck session, the period between the Nov. 8 election and his successor's inauguration.

Pressure may continue to build from the president's progressive critics if the government does not convince the court to shield six documents containing communications between the government and the corporate advisers.

Meanwhile, the administration's lawyers can breathe more easily until after the elections: The court invited IP Watch and the government to submit written arguments over these documents through Nov. 14, and is unlikely to rule until much later.