TORONTO (CBSNEWS/AP) – The United States and Canada announced late Sunday they’d reached a deal for Canada to stay in the North American trade pact with the United States and Mexico. The announcement was made an hour before a White House-imposed deadline of midnight on Sept 30.

In a joint statement, U.S.Trade Representative Robert Lighthizer and Canadian Foreign Affairs Minister Chrystia Freeland said the accord would be renamed the USMCA (United States-Mexico-Canada Agreement).

They asserted that USMCA would result in freer markets and fairer trade.

“USMCA will give our workers, farmers, ranchers, and businesses a high-standard trade agreement that will result in freer markets, fairer trade and robust economic growth in our region,” the joint statement said. “It will strengthen the middle class, and create good, well-paying jobs and new opportunities for the nearly half billion people who call North America home.”

The agreement gives U.S. farmers greater access to the Canadian dairy market. But it keeps a North American Free Trade Agreement (NAFTA) dispute-resolution process that the U.S. wanted to jettison and offers Canada protection if President Trump goes ahead with plans to impose tariffs on cars, trucks and auto parts imported into the U.S.

The president took to Twitter early Monday to sing the deal’s praises:

In another tweet, Mr. Trump said the new agreement “greatly opens markets to our Farmers and Manufacturers, reduce[s] Trade Barriers to the U.S. and will bring all three Great Nations closer together in competition with the rest of the world.”

Senior administration officials speaking with CBS News called the pact a “big win” for the U.S.

Canadian and Mexican officials praised it.

“It’s a good day for Canada,” Prime Minister Justin Trudeau said as he left his office. Trudeau said he would have more to say Monday.

“It is a good night for Mexico, and for North America,” Mexican Foreign Minister Luis Videgaray tweeted.

“We celebrate a trilateral deal. The door closes on trade fragmentation in the region,” Jesus Seade, trade negotiator for Mexico’s incoming president, said via Twitter.

Representatives of Mexican president-elect Andrés Manuel López Obrador called a news conference for Monday to discuss details of the deal.

The administration officials told CBS News they expected it to be signed by Mr. Trump and his Canadian and Mexican counterparts on Nov. 30, then submitted to Congress, with a vote expected some time next year. Getting Congressional approval could be difficult, especially if Democrats take control of the House, the officials said.

They noted that the accord would come up for review every six years, which they said would give the U.S. significant leverage if Canada or Mexico don’t comply with any parts of it.

The importance of a new U.S.-Mexico-Canada trade deal can’t be underestimated: Trade among the three partners affects jobs and profits in all of them, and all three wanted to get a deal done before the change of government in Mexico in two months, CBS News’ Pamela Falk reports.

The original North America deal took years to negotiate and commerce among the U.S., Mexico and Canada has relied on the continuation of a trade accord, Falk added. Canada, the United States’ No. 2 trading partner, was left out when the U.S. and Mexico reached an agreement last month to revamp NAFTA.

So much American trade depends on the 1994 deal that U.S. financial markets were jittery about a possible collapse of negotiations — and because Mr. Trump made campaign promises to get rid of NAFTA.

Mexico’s economics ministry said in a tweet earlier Sunday that the text of the pact would be delivered to the Mexican Senate Sunday night, adding that, “If there is agreement with Canada, the text will be trilateral. If there is not, it will be bilateral.”

Mr. Trump had said he wanted to go ahead with a revamped NAFTA — with or without Canada. It was unclear, however, whether he had authority from Congress to pursue a revamped NAFTA with only Mexico, and some lawmakers said they wouldn’t go along with a deal that left out Canada.

U.S.-Canada talks bogged down earlier this month, and most trade analysts expected the Sept. 30 deadline to come and go without Canada being reinstated. They suspected Canada, which had said it wasn’t bound by U.S. deadlines, was delaying the talks until after provincial elections Monday in Quebec, where support for Canadian dairy tariffs runs high.

© 2018 CBS Interactive Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.