– The Trump administration eased off its threat to exclude Canada from the North American Free Trade Agreement, extending talks that were set to end Friday while warning that the Canadians must be "willing" to accept U.S. terms.

After four days of marathon negotiations between Canadian and U.S. officials failed to produce an agreement, the White House told Congress it would enter into a revised trade deal with Mexico and that it was up to Canada to decide whether to remain in the trilateral NAFTA pact.

"Today the president notified the Congress of his intent to sign a trade agreement with Mexico — and Canada, if it is willing — 90 days from now," Robert Lighthizer, the U.S. trade representative, said in a statement.

The White House agreement to keep talking has less to do with a change of heart than with political realities: Congress, which has ultimate authority over trade agreements, has warned the White House that any revised deal must include both Canada and Mexico. Canada is the major export destination for 36 U.S. states, and many of the president's political supporters insisted that he first "do no harm" to the deal. Without Canada, GOP lawmakers would be likely to scuttle any new NAFTA pact, dealing President Donald Trump an embarrassing loss.

Yet the political necessity of keeping Canada in the NAFTA fold did not stop Trump from poking Canada in the eye, accusing that nation on Friday of taking "advantage" of the United States, continuing to threaten it with auto tariffs and appearing to enjoy it when disparaging comments he had made about Canada in private became public in the middle of tense negotiations.

Trump rattled the trade talks at the 11th hour when the Toronto Star on Friday published off-the-record comments Trump had given during an interview with Bloomberg News. Trump, according to the report, said he had no plans to make concessions to Canada and that any agreement would be "totally on our terms."

The president responded in a tweet Friday, saying his agreement to speak off the record had been "blatantly violated," before adding, "At least Canada knows where I stand!"

Whether Canada and the United States can reach a deal remains to be seen. Several big sticking points remain, and the president's comments have only inflamed Canadians, who do not want Prime Minister Justin Trudeau to give in to U.S. demands.

"This idea that Canada is somehow going to get bullied into a bad deal, I can suggest to you that that's not going to happen," Jerry Dias, the leader of the Canadian union Unifor said Friday. "I think if he was serious about a trade deal, he wouldn't make those types of comments, because all they do is inflame the situation, and frankly it's foolish."

Canadian negotiators suggested Friday that they were simply ignoring Trump's comments, viewing them as bluster and focusing instead on the trade officials in the negotiations.

"My negotiating counterparty is Ambassador Lighthizer, and as I said he has brought good faith and goodwill to the table," Chrystia Freeland, Canada's foreign minister, said. "It is going to take flexibility on all sides to get to a deal in the end."

The decision to move forward capped off a rocky negotiating session Friday, as the United States and Canada struggled to reach agreement on several contentious issues, including Canada's barriers on dairy imports, its rules governing movies, books and other media, and a mechanism for settling trade disputes between the two countries, people briefed on the talks said.

Canada has insisted on protections for its publishing and broadcasting industries over concerns these businesses would be overwhelmed by the much larger U.S. market. It has also resisted Trump's repeated calls for Canada to overhaul its dairy industry. Unlike the United States, which directly subsidizes farmers, Canada uses a supply management system to regulate the volume of imports and keep prices stable for its farmers.

Canada has given foreign countries more access to its dairy market in past trade agreements, and agricultural experts said negotiators were prepared to make similar offers in these NAFTA negotiations. However, Canada's offers have failed to pass muster with the administration, which wants greater access to its market than Canada appears willing to provide.

"The negotiations between the United States and Canada are ongoing," a spokeswoman for the U.S. trade representative said. "There have been no concessions by Canada on agriculture."

Freeland said repeatedly this week that Canada and the United States had agreed not to discuss the details of the talks in public while negotiations were taking place.

The countries are also sparring over a NAFTA provision known as Chapter 19, which allows foreign countries to appeal the duties the U.S. levies on them for providing subsidies and dumping products into the U.S. market.

Administration officials confirmed they had eliminated the provision in their agreement with Mexico, but the Canadians have insisted that it is necessary to protect industries, like lumber, from biased rulings in the United States.