Over 88 per cent of US exports of consumer and industrial goods to Panama will become duty-free immediately, with remaining tariffs to be phased out over 10 years.
The deal also gives Panama's farmers more access to the US sugar market, a sensitive sector for the US voters.
More than half of current US farm exports to Panama, including high-quality beef and other meat and poultry products, will become duty-free immediately, with most other farm tariffs phased out over 15 years.
Susan Schwab, a US trade representative, said: "This historic agreement between two good friends and close partners will promote economic growth and development in both of our countries."
Alejandro Ferrer, Panama's minister of trade and industry, said the accord was a good deal for Panama, where 40 per cent of people live in poverty.
Ferrer said: "This is an historic day for the social and economic development of Panama. We have achieved the best treaty possible with the United States... allowing us to move ahead in the reduction of poverty."
Panama said it managed to win exclusions on three key crops: coffee, potatoes and onions, meaning local farmers will be protected from a flood of cheap US imports.
Last year, Panama exported $419m in goods to the US, or 43 per cent of its total shipments abroad. US exports to Panama totaled $1.13bn, according to Panama's national statistics office.
In January, Panama's agriculture minister resigned in protest over the deal.
A US trade official said a particular worry for the Panamanian government was that it did not want to be seen as giving "back the canal to the Americans."
Reflecting that concern, the talks were put on hold ahead of Panama's referendum in October on the canal project, which voters overwhelmingly approved.