WASHINGTON  -  The United States is pressing ahead with a free trade pact with Mexico, but whether Canada will join depends on a new round of talks next week, after negotiations ended Friday without an agreement.

Officials had appeared to be on track to reach a deal that would rewrite the North American Free Trade Agreement, but in a bizarre twist, inflammatory comments from President Donald Trump angered Canadian officials and threatened to upend the talks.

The US and Mexico announced a breakthrough accord on Monday, potentially leaving Canada out in the cold if no deal is reached, but Ottawa's foreign minister insisted that a "win-win-win" agreement is within reach.

US and Canadian officials said talks will resume on Wednesday, but the White House already notified Congress Friday of its "intent to sign a trade agreement with Mexico -- and Canada, if it is willing -- 90 days from now."

The White House now has 30 days before it must present the full text of the new agreement to Congress, which will give Ottawa and Washington time to iron out remaining differences.

"We know that a win-win-win agreement is within reach," Foreign Minister Chrystia Freeland told reporters after a week of talks to rewrite the 25-year-old NAFTA.

"With good will and flexibility on all sides, I know we can get there."

However, she repeated that Canada will only sign an agreement that is in its national interest.

"We'll keep talking until we reach a good deal," Freeland said.

US Trade Representative Robert Lighthizer said the negotiations over the past four days were "constructive, and we made progress.

"Our officials are continuing to work toward agreement. The USTR team will meet with Minister Freeland and her colleagues Wednesday of next week," he said in a statement. Lighthizer stressed that the new agreement will have "huge benefits for our workers, farmers, ranchers, and businesses."

After the US and Mexico reached an agreement on new rules for auto trade, and tougher protections for workers and intellectual property, talks with Canada were hung up on the mechanisms used to resolve disputes among partners, and on Ottawa's strictly controlled dairy sector.

"I think all three countries have worked together very productively, and we're getting more and more excited about the results," a senior US official told reporters. But the official said that Washington could go ahead with just Mexico if Canada decides not to sign on to the near trade deal.

Mexican officials stressed in a joint statement that they are "continuing to promote an agreement to which Canada is a party."

Jake Colvin of the National Foreign Trade Council agreed with that priority, saying: "Our strong preference is for a trilateral" agreement.

"That's the preference of the business community, and the preference of Congress," Colvin said.

- 'I can't kill these people' -

As negotiations went down to the wire earlier on Friday, Trump, who has been highly critical of Canada's managed dairy market, confirmed he was taking a hardline stance in the talks.

Then the Toronto Star reported that Trump boasted in an interview that he was playing hardball with Canada in the negotiations.

"If I say no -- the answer's no. If I say no, then you're going to put that, and it's going to be so insulting they're not going to be able to make a deal... I can't kill these people," the newspaper quoted Trump as saying off-the-record during an interview with Bloomberg.

While Freeland said the US trade team was negotiating in good faith, a Canadian source told AFP that Ottawa expressed their disapproval to Lighthizer.

The Star said officials in the government of Prime Minister Justin Trudeau, who had been optimistic about reaching a deal with Washington, were angered by the reported comments.

Trump lashed out on Twitter for what he said was a breach of an off-the-record agreement, but he confirmed that he was taking a hardline stance in the talks.

"Wow, I made OFF THE RECORD COMMENTS to Bloomberg concerning Canada, and this powerful understanding was BLATANTLY VIOLATED. Oh well, just more dishonest reporting. I am used to it," Trump tweeted.

"At least Canada knows where I stand!"