House Speaker Nancy Pelosi on Tuesday announced that Democrats had struck a deal on the new U.S. trade deal with Mexico and Canada.

Pelosi is a longtime free-trader and supported the original North American Free Trade Agreement, or NAFTA, breaking with many Democratic labor supporters who opposed the deal. That 1994 trade pact deeply divided Democrats and was opposed by conservative Republicans such as Patrick J. Buchanan.

Trump had accused Pelosi of being incapable of passing the agreement because she is too wrapped up in impeachment. On Monday, White House trade adviser Peter Navarro said on Siriux XM’s Breitbart News Daily that Pelosi was the sole individual standing in the way of getting the deal signed.

Pelosi on Tuesday said the new deal was a “victory for America’s workers.”

Pelosi’s announcement came less than one hour after Democrats announced their impeachment charged against President Donald Trump, creating the odd juxtaposition of Democrats handing the president a major legislative victory while furthering their attempts to remove him from office.

President Trump celebrated the U.S.-Mexico-Canada Agreement, or USMCA, in pair of tweet Tuesday morning.

“It will be the best and most important trade deal ever made by the USA. Good for everybody – Farmers, Manufacturers, Energy, Unions – tremendous support. Importantly, we will finally end our Country’s worst Trade Deal, NAFTA!” the president said.

America’s great USMCA Trade Bill is looking good. It will be the best and most important trade deal ever made by the USA. Good for everybody – Farmers, Manufacturers, Energy, Unions – tremendous support. Importantly, we will finally end our Country’s worst Trade Deal, NAFTA! — Donald J. Trump (@realDonaldTrump) December 10, 2019

Looking like very good Democrat support for USMCA. That would be great for our Country! — Donald J. Trump (@realDonaldTrump) December 10, 2019

Repealing and replacing NAFTA was one of Trump’s signature 2016 campaign promises. The adoption of the USMCA fulfills that promise.

The USMCA tightens the rules of origination in North America for the cars and trucks to receive tariff-free treatment, requiring a larger proportion of the final product be made in the three countries. These are aimed at creating more manufacturing jobs within the three-country pact. It also contains provisions guaranteeing a minimum wage.

Perhaps most importantly, the deal has a built in sunset provision. Every six years, the countries involved will meet to decide whether or not to extend it for another six years. That will force the three countries to negotiate updates to the agreement rather than let an outdated pact linger as NAFTA had.

The House is planning to vote on the agreement next week. Now that it has support from House Democrats and U.S. labor leaders, it is expected to pass easily.

When it was first announced, the USMCA was been hailed by the United Steelworkers as requiring significantly greater protection for workers than NAFTA. It was also hailed by U.S. dairy farmers for opening up Canada’s highly regulated dairy market.

The United Autoworkers described it as a “step in the right direction” but, along with other labor leaders such as AFL-CIO chief Richard Trumka, raised concerns that it might not be enforced rigorously enough. The agreement now includes stronger provisions for enforcement, including labor attaches on the ground in Mexico to assure that Mexico is complying with its promises on workers’ rights. That had been something Mexico had originally resisted as a violation of its sovereignty.

On Tuesday, AFL-CIO leader Richard Trumka announced his support for the new deal.

Make no mistake, we demanded a trade deal that benefits workers and fought every single day to negotiate that deal; and now we have secured an agreement that working people can proudly support. #USMCA — Richard Trumka (@RichardTrumka) December 10, 2019

A coalition of Pelosi-led Democrats and some Republican lawmakers had been resisting the inclusion provisions mirroring Section 230 of the Communications Decency Act, which provides a legal shield for big tech companies from liability for users’ content. Conservatives are concerned that the provisions unintentionally license tech companies to censor political speech and its inclusion would make reform of the Communications Decency Act more difficult. Trump administration officials said this was based on a misreading of the provision. It appears to have survived the negotiations and is expected to be part of the final agreement.

—The Associated Press contributed to this report.