The Trans-Pacific Partnership (TPP) will create a new economic bloc with reduced trade barriers between the 12 nations involved.
The deal was signed after five days of talks in Atlanta in the US but has been under negotiation for five years.
It was delayed repeatedly by negotiations over drug patents.
The other countries included in the TPP are Australia, Brunei Darussalam, Canada, Chile, Malaysia, Mexico, New Zealand, Peru, Singapore, and Vietnam.
US president Barack Obama said in a statement that the deal “reflects America’s values and gives our workers the fair shot at success they deserve”.
“When more than 95 percent of our potential customers live outside our borders, we can’t let countries like China write the rules of the global economy,” he said.
“We should write those rules, opening new markets to American products while setting high standards for protecting workers and preserving our environment.”
Japanese Prime Minister Shinzo Abe told reporters the deal was a “major outcome not just for Japan but also for the future of the Asia-Pacific”.
If ratified by the individual countries involved, the agreement has the potential to influence trade in everything from dairy produce to cancer treatments.
Supporters say it could be worth billions of dollars to the countries involved but critics say it was negotiated in secret and is biased towards corporations.
The final round of talks were delayed by negotiations over how long pharmaceutical corporations should be allowed to have a monopoly period on next-generation drugs.
The US had sought 12 years of protection to encourage pharmaceutical companies to invest in expensive biological treatments.
Australia, New Zealand and public health groups had sought a period of five years to bring down drug costs and the burden on state-subsidized medical programs.
An compromise was reached but the agreed protection period has not been confirmed.
Speaking at a press conference following the deal, US Trade Representative Michael Froman hailed the deal as the first to set a period of protection for patents on new drugs, which he said would “incentivise” drug producers.
But Washington-based Biotechnology Industry Association said it was “very disappointed” by the reports that the agreement fell short of the 12-year protections sought by the US.
Asked about potential job losses – a criticism of the deal – Canada’s trade minister Ed Fast said: “We don’t anticipate that there will be job losses. Obviously there will be industries that have to adapt.”
The agreement was a “once in a lifetime to shape rules in the Asia Pacific region”, Mr Fast added.
The TPP has been championed by Barack Obama, who said previously he hoped it would address “21st century trade issues” such as intellectual property protections, digital trade rights and protections for investors.
The Obama administration also hopes that China, the world’s second-largest economy, will eventually be forced to accept the standards locked into place by the TPP.