U.S. President Donald Trump raised the possibility of scrapping the North American Free Trade Agreement and pursuing a bilateral trade agreement between Canada and the United States in his meeting with Prime Minister Justin Trudeau, CBC News has learned.

Trump had acknowledged the possibility publicly while posing for a photo with Trudeau in the Oval Office on Wednesday.

"Oh sure, absolutely," Trump said, when asked by a reporter whether he could imagine a bilateral deal with Canada instead of the current tripartite agreement that includes Mexico.

"It's possible we won't be able to reach a deal with one or the other. But in the meantime we'll be able to make a deal with one. But I think we have a chance to do something very creative that's good for Canada, Mexico and the United States."

It's unclear how seriously Trump is considering the possibility of scrapping NAFTA — any attempt to do so could encounter significant legal and legislative obstacles — but Trump told Forbes magazine earlier this week that he likes "bilateral deals."

According to a source familiar with the talks, Trudeau told Trump that Canada's priority was maintaining a continental deal, a position the prime minister repeated to reporters later in the day.

Guessing at NAFTA's future

Speaking to reporters after his meeting with Trump, Trudeau said he remains optimistic about the NAFTA renegotiations, but that Canada has to be "ready for anything."

"I think Canadians are aware that the American administration and the president makes decisions that surprise people from time to time," Trudeau said, "and that is something that we are very much aware of, and very braced for and conscious of."

At a separate event in Washington on Wednesday, former prime minister Stephen Harper told an audience that he has advised companies to prepare for the possibility that NAFTA will not survive.

"I believe Donald Trump would be willing to take the economic and political risk of that under certain circumstances," Harper said as part of a panel discussion.

Appearing alongside Harper, Newt Gingrich, a former Speaker of the U.S. House of Representatives, was somewhat optimistic that NAFTA would be maintained.

"My hunch is in the end we will get to a reformed NAFTA. We will not get to the end of NAFTA," Gingrich said.

"I don't think there's an appetite for blowing it all up, other than the president's occasional tweets.… I think it'll be a brawl [though]."