Negotiations between Canada and the US continued into late Sunday night, with news breaking after midnight that the two countries had agreed to terms for a new trilateral trade agreement with Mexico.

US President Donald Trump and Canadian Prime Minister Justin Trudeau both touted the breakthrough on Twitter, which was dubbed the US Mexico Canada Agreement in a joint statement released by trade negotiators.

The deal “will bring all three Great Nations together in competition with the rest of the world. The USMCA is a historic transaction!” Trump wrote Monday morning.

Trudeau said the agreement marked “a good day for Canada & our closest trading partners.”

US stocks, along with the Canadian dollar and Mexican peso, rose on the news.

The main concession agreed to by Canada was opening up its dairy market, which Trump highlighted in a press conference in the White House Rose Garden on Monday.

The USMCA is “the biggest trade deal in the United States’ history,” Trump told reporters.

Acknowledging tension in his relationship with Trudeau, he said that the two countries still have “a great relationship and we are going to work as a partner.”

When asked what concession the US gave in the deal Trump said that coming to an agreement at all was a concession. Canada’s Financial Post suggested that the US negotiators’ willingness to keep the chapter-19 dispute resolution mechanism intact was a win for Ottawa. US officials had argued that the mechanism undermined the autonomy of their courts.