After years of negotiation, the 12 countries behind the Trans-Pacific Partnership have finally signed off on a trade deal worth almost half the world's GDP. So how did we get here? And what exactly have we walked into?

Dubbed by opponents as "the dirtiest trade deal you've never heard of," the Trans-Pacific Partnership has finally been endorsed Thursday, with trade officials from 12 countries around the Pacific Rim signing off on the complete text of the controversial deal in Auckland, New Zealand.

While the lengthy document details complex trade arrangements covering roughly 40 percent of the world's GDP, the TPP was negotiated behind closed doors, with only the top brass from the 12 signatory states able to pore over the fine print.

But why all the secrecy? Top officials insisted throughout the process that trade documents could not be shared during negotiations. But critics warned that this practice left key stakeholders out of the loop and even high-ranking politicians from signatory countries complained about being left in the dark over exactly what their respective governments were agreeing to.

Negotiations began more than 5 years ago but we didn't see the draft of the text until 2013, when Wikileaks leaked the Intellectual Property Chapter. For the first time we got a glimpse of how copyright, digital rights management (DRM) and torrenting could be treated under the deal.

One could see the TPP as a Christmas wish-list for major corporations, and the copyright parts of the text support such a view.

Matthew Rimmer, IP expert at Queensland University of Technology

Critics warned at the time that the trade pact amounted to little more than "a Christmas wish-list for major corporations, and the copyright parts of the text support such a view.

Getting around geo-blocks

One clause, proposed by the US, Australia, Singapore, Peru and Mexico, sought to prohibit circumvention of technological protection measures (such as DRM) on digital works. Before long, Netflix users outside the US were getting nervous about whether they would still be able to use a virtual private network to access the service -- a practice now officially opposed by the streaming service after years of turning a blind eye.

Pacific Grim

The leaked IP chapter also demonstrated a clear position on torrenting and piracy, warning of "criminal procedures and penalties" for copyright infringement and "penalties of sufficient severity to provide a deterrent" for further breaches.

While only the most dedicated of trade experts and tariff enthusiasts have braved reading all 30 chapters of the TPP, the IP chapter alone was enough to raise the hackles of digital civil liberties advocates.

The final leg

We have to do everything we can to stop this agreement from getting signed, ratified, and put into force.

Electronic Frontier Foundation

Talks finish

Negotiations wrapped up in October 2015, but the detail of the deal remained under wraps. The countries involved were claiming a win, with the US saying the TPP promoted "US values" and Australia saying it was good for local agriculture.

But critics such as the US Electronics Frontiers Foundation were not convinced, saying, "We have to do everything we can to stop this agreement from getting signed, ratified, and put into force."

Some light reading

In November, the full 622-page text of the TPP was revealed, and it was bad news for the EFF and its ilk. Among the cheery reading was a 75-page IP chapter (the longest of all 30 chapters) that discussed "sentences of imprisonment" and "monetary fines" for doing the dirty on copyright, as well as longer copyright terms and restrictions on DRM.

What next?

Now that the TPP has been signed, each of the 12 signatories needs to head home and push the agreement through their own treaty ratification processes. In the US, the TPP still needs to clear Congress, and in Australia, the TPP must now be tabled in Parliament for review. But with the deal expected to win support on home turf, these hurdles should soon be cleared.

Once all the original signatories have approved the deal back home, we only need to wait 60 days for the TPP to come into force. Then, it will be all ours.

What Amazon's one-day shipping means for you: Last week, Amazon announced it will decrease the standard shipping time for Prime members from two days to one. In this Tech Minute, here's how this change will impact your deliveries.