OTTAWA -- Prime Minister Justin Trudeau says he helped ward off a sudden cancellation to NAFTA by convincing U.S. President Donald Trump that too many jobs depend on the agreement remaining in place.

On Wednesday, U.S. media reports said Trump was going to start the process to withdraw from NAFTA, rather than first trying to renegotiate the trade deal.

By late evening, Trump said he had changed his mind after speaking with Trudeau and Mexican President Enrique Pena Nieto.

Speaking in Gray, Sask. on Thursday, Trudeau said he and Trump had a good conversation during which the U.S. president said he was thinking of cancelling the deal, and Trudeau argued there are too many jobs that rely on the free trade measures laid out under NAFTA.

"He expressed that yes, he was very much thinking about cancelling," Trudeau said.

"I highlighted... a disruption like cancelling NAFTA, even if it eventually theoretically might lead to better outcomes, would cause a lot of short and medium term pain for an awful lot of families."

Trudeau said both he and the American president were elected on platforms that promised to help the middle class, grow the economy "and bring along people who don't always feel like they've had a fair shake."

The two leaders then agreed to improve NAFTA rather than get rid of it, Trudeau said.

A government official said Trudeau and Pena Nieto haven’t talked in several weeks, and didn’t co-ordinate ahead of their separate calls with Trump.

Trump gave his own version of the call, speaking to reporters in Washington Thursday morning.

"I was going to terminate NAFTA as of two or three days from now," he said, but both Trudeau and Pena Nieto called him to ask him to renegotiate instead.

"I like both of these gentlemen very much," Trump said.

"I like them very much, I respect their countries very much, the relationship is very special, and I said I will hold on the termination. Let's see if we can make it a fair deal."

Trump said Trudeau and Pena Nieto understand the deal must be fair for the U.S. or he will terminate it, which he admitted "would be a pretty big shock to the system."

Trump pledged during his presidential bid to renegotiate or terminate NAFTA.