US President Donald Trump has told the leaders of Mexico and Canada that he will not pull out of the North American Free Trade Agreement (NAFTA), just hours after administration officials said he was considering a draft executive order to do just that.

The White House on Wednesday made the surprise announcement in a read-out of calls between Trump, Mexican President Enrique Pena Nieto and Canadian Prime Minister Justin Trudeau.

"President Trump agreed not to terminate NAFTA at this time and the leaders agreed to proceed swiftly, according to their required internal procedures, to enable the renegotiation of the NAFTA deal to the benefit of all three countries," the White House statement said.

"It is my privilege to bring NAFTA up to date through renegotiation," Trump said in the statement.

READ MORE: NAFTA and the US, explained

The Mexican government confirmed the conversation in a statement issued late on Wednesday.

"The leaders agreed on the convenience of maintaining the North American Free Trade Agreement and working together with Canada to carry out a successful renegotiation for the benefit of all three countries," the statement read.

The White House announcement came hours after administration officials said Trump was considering a draft executive order to withdraw the US from the deal - though administration officials cautioned it was just one of a number of options being discussed by the president and his staff.

Is Trump against free trade?

White House Press Secretary Sean Spicer declined to comment on the potential executive order, which was first reported by Politico.

Some saw the executive order threat as posturing by Trump to gain leverage over Mexico and Canada as he tries to negotiate changes to the deal. Trump railed against the decades-old trade deal during his campaign, describing it as a "disaster".

The NAFTA trade deal, which took effect in 1994, has been blamed by Trump and other critics for wiping out US manufacturing jobs because it allowed companies to move factories to Mexico to take advantage of low-wage labour.

Trump told the AP news agency in an interview last week that he planned to either renegotiate or terminate the NAFTA.

"I am very upset with NAFTA. I think NAFTA has been a catastrophic trade deal for the United States...It hurts us with Canada, and it hurts us with Mexico," he said.

The administration appeared to be divided on Wednesday over how and when to proceed, as they balanced a newfound cautiousness with the desire to rack up accomplishments before Trump's 100th day in the job.

Hundred days of Trump

Some were gunning for Trump to sign a draft order this week, while others were weighing up the complications surrounding withdrawing from or renegotiating the deal without Congress fully onboard.

Trump could withdraw from NAFTA - but he would have to give six months' notice. And it is unclear what would happen next. The law congress passed to enact the trade pact might remain in place, forcing Trump to wrangle with politicians and raising questions about the president's authority to raise tariffs on Mexican and Canadian imports.

READ MORE: Mexicans left behind by NAFTA see opportunity in Trump

The US administration announced earlier this month that it would slap hefty tariffs on softwood lumber being imported from Canada. Trump has also been railing against changes in Canadian milk product pricing that he says are hurting the American dairy industry.

In January Trump pulled the US out of the Trans-Pacific Partnership trade deal, which would have been the largest ever trade pact as measured by the gross domestic product of the 12 intended member countries in the Americas and Asia.

Why is Trump against the TPP deal?

The Trump administration last month submitted a vague set of guidelines to congress for renegotiating NAFTA, disappointing those who were expecting Trump to demand a major overhaul.

In an eight-page draft letter to Congress, acting US Trade Representative Stephen Vaughn wrote that the administration intended to start talking with Mexico and Canada about making changes to the pact.

The letter spelled out few details and stuck with broad principles. But it appeared to keep much of the existing agreement in place, including private tribunals that allow companies to challenge national laws on the grounds that they inhibit trade - a provision that critics say allows companies to get around environmental and labour laws.

Reports on Wednesday of the possible executive order drew objections from some in Congress, including Senator John McCain of Arizona.

"Withdrawing from #NAFTA would be a disaster for #Arizona jobs & economy," he tweeted. "@POTUS shouldn't abandon this vital trade agreement."

Source: News agencies