Image copyright AFP/Getty

The US, Mexico and Canada have finalised a trade deal that will replace the 25-year-old North American Free Trade Agreement (Nafta).

Representatives from the three countries signed the pact in Mexico.

They met hours after Democrats in US Congress said they would support the deal after the White House agreed to strengthen the labour and environmental rules.

The three countries had concluded their talks more than a year ago.

But the deal needs approval by legislatures in the three countries before it can move forward.

House Speaker Nancy Pelosi declared the revised pact "infinitely better" than the deal the three countries announced last year.

US President Donald Trump, who had accused the Democrats of holding up the deal, also declared victory.

The US-Mexico-Canada Agreement (USMCA) will be "the best and most important trade deal ever made by the USA. Good for everybody - Farmers, Manufacturers, Energy, Unions - tremendous support," he tweeted.

During his 2016 presidential campaign, Mr Trump promised to replace Nafta, which he and many Democrats blame for speeding the decline of US manufacturing.

Talks started in 2017 and the three countries agreed to terms last year. Among the most eye-catching changes were new rules that require a higher share of North American-made parts for a vehicle to qualify for tariff-free treatment.

Democrats, who control the House of Representatives, were also pushing for changes to strengthen enforcement of labour and environmental rules, and provide more flexibility governing drug pricing.

On Tuesday, Democrats said they had reached an agreement with the White House on new provisions and were planning to support the deal in a vote.

"There is no question, of course, that this trade agreement is much better than Nafta but... it is infinitely better than what was initially proposed by the administration," Ms Pelosi said.

Democrats' decision to advance the deal, known as USMCA, gives Mr Trump a victory on one of his signature issues, trade. But it also serves to undercut criticism by Republicans that the Democrats are too focused on impeachment to govern.

The US business community said news that the deal would move forward was a relief and urged Congress to bring it to a vote quickly. Canada and Mexico are two of the US's biggest trade partners.

"Farmers have been struggling in the face of bad weather and unpredictable trade policy," said Angela Hofmann, co-executive director of the lobby group, Farmers for Free Trade.

"Passing USMCA will guarantee that our farmers' closest and most important markets, will remain free from tariffs and red tape."

Analysis by Will Grant, Mexico Correspondent

It is all a far cry from 1st January 1994 when the North American Free Trade Agreement - reached between the so-called "Three Amigos" of the US, Mexico and Canada - came into force.

For President Trump, who called NAFTA "the worst trade deal in the history of the country", the definitive end of that deal is very welcome.

For Mexican President Andres Manuel Lopez Obrador, the mood is primarily one of relief. He confirmed the final sticking points, namely labour rights, steel and aluminium, had been overcome and will no doubt be glad to be rid of the negotiations that were threatening to drag on well into 2020.

But for millions of Mexican workers, the signing of the USMCA agreement will have been by met with something of a shrug. The Mexican press has argued that USMCA is essentially Nafta dressed up in different language and many are either indifferent or unsure exactly what the new deal will mean for them. They will have to see once it comes into force next year whether it has any significant bearing on their jobs, either for better or worse.