US President Donald Trump, on the campaign trail, labelled NAFTA "the worst trade deal" ever signed by the US.

Trump blames NAFTA for wiping out US manufacturing jobs because it allowed companies to move factories to Mexico where labour is cheaper.

In April 2017, US President threatened to pull out of the trade agreement. Canada and Mexico insisted to renegotiate it instead, and Trump agreed.

Here is what NAFTA is all about.

What is NAFTA?

NAFTA stands for the North American Free Trade Agreement to lift tariffs (taxes on imports and exports) on virtually all goods traded among the US, Canada, and Mexico.

NAFTA came into effect on January 1, 1994, after it was signed on December 17, 1992 by:

US President George H.W. Bush

Canadian Prime Minister Brian Mulroney

Mexican President Carlos Salinas

What is the purpose of NAFTA?

The aim of NAFTA was to make it easier for companies in the three countries to do business across borders.

The argument for NAFTA was that - by boosting economic integration - there would be increased economic prosperity in all three countries.

Can Trump pull out of NAFTA?

As per the NAFTA agreement, a country can withdraw from it after giving six months notice.

In the US, Trump can set that in motion without congressional approval. In April he requested a renegotiation of the terms of the NAFTA agreement.

Has the US lost jobs because of NAFTA?

Researchers have found mixed effects on the US labour force. Some industries have shrunk, while others have grown.

The Economic Policy Institute said in 2013 that some 700,000 jobs had been lost as production moved to Mexico - with California, Texas, and Michigan among the worst hit states.

A 2014 report from the Peterson Institute for International Economics said that at most 5 percent of dislocated US workers could be traced to imports from Mexico. It said over four million Americans lose their jobs each year by plant shutdowns and mass layoffs, regardless of trade.

A nonpartisan report by congress published in 2015 said, "NAFTA did not cause the huge job losses feared by the critics or the large economic gains predicted by supporters".

Who benefits from NAFTA and who loses?

Since NAFTA, trade quadrupled among the three countries, surpassing $1tn in 2015, reported Reuters news agency.

Economists Shushanik Hakobyan and John McLaren studied NAFTA's effect on the US labour market in 2016. They found a severe impact on income among blue-collar workers in the most affected industries and areas.

College-educated workers were less likely to be affected, they said, and executives saw some benefits.

"The most affected workers were college dropouts working in industries that depended heavily on tariff protections in place prior to NAFTA. These workers saw wage growth drop by as much as 17 percentage points relative to wage growth in unaffected industries," McLaren told UVA Today.

If NAFTA is not to blame for manufacturing job losses, what is?

It is difficult to separate effects of NAFTA from other developments.

Economists note that manufacturing employment was already in decline before NAFTA was signed.

Much of the decline can be attributed to automation in US industry. Companies have been able to increase output with fewer workers.

Also, US tariff cuts on Mexican trade under NAFTA were implemented at roughly the same time as tariff cuts with most other countries as the US entered the World Trade Organization (WTO) in 1995.

Competition from Chinese exports increased during the same time period and boomed as China joined the WTO in 2001. Economists are more united in the view that the US has lost more jobs to China than to Mexico.

What is NAFTA's impact on Mexico and Canada?

According to the Council on Foreign Relations (CFR), NAFTA gave a major boost to Mexican farm exports to the US, which have tripled since NAFTA's implementation. Hundreds of thousands of Mexican auto-manufacturing jobs have also been created, and most studies have found that the pact had a positive impact on Mexican productivity and consumer prices.

But there are significant downsides: Mexico's economy grew at an average rate of just 1.3 percent a year between 1993 and 2013 during a period when Latin America was undergoing a major expansion, and poverty remains at similar levels to 1994, while mass unemployment has increased.

Some believe that, instead of fulfilling its promise of providing cheaper food to Mexicans, NAFTA deepened Mexico's dependency on food imports, leaving it unprotected from volatility in international food prices and exchange rates, reported Al Jazeera recently.

On Wednesday, thousands of Mexican farmers and workers took to the streets demanding that NAFTA be abandoned. They argue that the deal has devastated Mexican small farms, which struggle to compete with US imports.

Canada has seen strong gains in cross-border investment in the NAFTA era, according to the CFR: Since 1993, US and Mexican investments in Canada have tripled. Canadian agriculture, in particular, saw a boost, while employment in Canadian manufacturing held steady.

However, the "productivity gap" between the Canadian and US economies remains wide: Canada's labour productivity remains at 72 percent of US levels.