Long-awaited details of a sweeping but controversial 12-nation Pacific trade deal were released Thursday, setting the stage for a raucous debate in the U.S. Congress and giving a first glimpse of the text to critics who worry the agreement could gut protections for the environment, public health and labor.

The text of the Trans Pacific Partnership (TPP) agreement between the U.S. and 11 other Pacific Rim countries runs to 30 chapters and hundreds of pages. It is mind-boggling in its detail, laying out plans for handling of trade in everything from zinc dust to railway sleepers and live eels.

Governments of the 12 member countries released the complete text online Thursday, making public the specifics of an agreement that critics complain was forged in secrecy.

The document suggests that the pact reached Oct. 5 in Atlanta has attempted to assuage the fears of some. Negotiators appear to have agreed to promote environmental sustainability, respect the rights and needs of indigenous peoples, and temper protections for drug patents with safeguards for public health and access to medicines.

It also emphasizes the intention of the trading bloc to abide by earlier commitments made under the World Trade Organization and other international treaties.

But that is no guarantee the pact won't raise hackles with U.S. lawmakers who have questioned whether it will help U.S. exports and create jobs or just expose more American workers to low-wage competition, giving multinational corporations excessive power.

Under a trade law passed earlier this year, President Barack Obama must give the public time to review the text before he signs the agreement and turns it over to Congress for approval. Lawmakers can't nitpick the deal with amendments. They must simply vote yes or no. Congress is likely to take up the issue next year in the heat of the presidential election campaign.

Obama faces fierce resistance to the deal from within his own Democratic Party. Hillary Rodham Clinton, who is running for the Democratic presidential nomination, has said she's against it. Her opposition may make it harder for Obama to round up votes.

If all 12 countries have not ratified the agreement within two years, provisions allow for it to take effect if six countries comprising 85 percent of the GDP of the bloc have signed. That means U.S. ratification as the world's biggest economy is essential.

Apart from the U.S., countries in the trade pact are Japan, New Zealand, Australia, Chile, Peru, Mexico, Canada, Brunei, Singapore, Vietnam and Malaysia.

The White House says the deal eliminates more than 18,000 taxes that countries impose on U.S. exports. The agreement also calls for labor protections such as ensuring that workers in member countries have the right to form unions.

Those opposed to the deal contend it will force American workers to compete even more directly than they do now with workers in low-wage countries such as Vietnam.

They also complain that the agreement goes beyond traditional trade issues such as tariffs and import quotas and includes giveaways to powerful business lobbies.

The input from big businesses, such as pharmaceutical companies, recording studios, agribusinesses and other multinationals is evident in the myriad details laid out in the document. But negotiators reflected an awareness of those concerns with meticulous references to the rights of each country to protect its own sovereign powers and best interests.

In response to U.S. pressure, TPP countries agreed to give drug companies about eight years of protection from cheaper competitors for biologics, which are ultra-expensive medicines produced in living cells. The industry had sought 12 years protection.

The agreement stresses that its provisions on patents for medicines “do not and should not prevent a Party (country) from taking measures to protect public health.”

The agreement says it “should be interpreted and implemented in a manner supportive of each Party's right to protect public health and, in particular, to promote access to medicines for all.”

While the deal allows multinational companies to challenge laws and regulations in private tribunals on the grounds they amount to unfair barriers to trade, it also includes safeguards against abusive claims and guarantees governments the right to enforce health, labor, safety and environmental regulations in the public interest.

Countering worries that companies might be able to overturn local anti-smoking laws, countries can specifically ban tobacco companies from using the tribunals to challenge health regulations — likely to the consternation of U.S. lawmakers from tobacco-producing states.

Al Jazeera and wire services