WASHINGTON — One day after its historic impeachment votes, the Democratic-led House gave President Donald Trump an overwhelming bipartisan victory Thursday on a renegotiated trade agreement with Canada and Mexico.

By a 385-41 vote, the House approved a bill that puts in place terms of the United States-Mexico-Canada Agreement.

The legislation passed after House Speaker Nancy Pelosi, D-Calif., and her colleagues won key concessions from an administration anxious to pass the trade deal before next year’s election season makes that task more difficult.

The deal is projected to have only a modest impact on the economy. But it gives lawmakers from both parties the chance to support an agreement sought by farmers, ranchers and business owners anxious to move past the months of trade tensions that have complicated spending and hiring decisions.

The GOP-controlled Senate probably will take up the legislation when members return to Washington after the holidays and after dealing with impeachment.

Trump made tearing up the North American Free Trade Agreement a hallmark of his presidential run in 2016 as he tried to win over working-class voters in states such as Michigan, Ohio, Wisconsin and Pennsylvania.

“Critics said it couldn’t be done, but he made it happen. Another promise made, another promise kept,” said House Minority Leader Kevin McCarthy, R-Calif.

Some said the agreement did not do enough to prevent U.S. jobs from relocating to Mexico, but it won praise from Democrats who have routinely voted against prior trade agreements.

“Twenty-six years ago, I opposed NAFTA with every bone in my body,” said Rep. John Lewis, D-Ga. “I never thought the day would come when we would have the opportunity to right some of the wrongs in that agreement.”

Pelosi said the agreement was “light years” ahead of what the administration negotiated with Canada and Mexico. “We knew we could do better,” Pelosi said.

The original NAFTA phased out nearly all tariffs on goods produced and traded within North America. It was extraordinary because it linked two wealthy, developed countries with a poor, developing country. Since then, trade with Canada and Mexico has increased more rapidly than trade with most other countries.

Democrats for years have charged that NAFTA led to massive losses of high-paying manufacturing jobs in the U.S. as companies moved production to low-wage Mexico. Trump distinguished himself from free-trade Republicans in the presidential primary with his NAFTA-bashing rhetoric, and his administration got Canada and Mexico to negotiate a rewrite.

The International Trade Commission projected in April that the agreement would boost the economy by $68 billion and add 176,000 jobs six years after taking effect.

Some of the biggest impacts would be felt in the U.S. automotive industry. The agreement aims to see more cars produced where workers earn an average of at least $16 an hour.

The commission found that the new agreement would create 30,000 jobs in American auto parts plants. On the down side, the commission found the pact would increase the cost of pickup trucks and cars. That would hurt demand and reduce the number of jobs in factories that assemble cars by about 1,500.

Business and farm groups had been hitting the airwaves and the halls of Congress to get lawmakers to support the pact, putting pressure on Democrats to work with the administration even as labor unions remained wary that the new deal represented much of an improvement from NAFTA.

Trump, at times, seemed resigned to the assessment that the two sides would never reach a compromise. “She’s incapable of moving it,” Trump said a few weeks ago about Pelosi.

Behind the scenes, Trump’s lead negotiator, U.S. Trade Representative Robert Lighthizer, was working with House Democrats on changes to address their concerns. The agreement includes a process that could lead to inspections of factories and facilities in Mexico that are not living up to labor obligations.

It also secures more than $600 million for environmental problems in the NAFTA region. It scrapped giving pharmaceutical companies 10 years’ protection from cheaper competition in a category of ultra-expensive drugs called biologics, which are used to fight such illnesses as cancer, rheumatoid arthritis and diabetes.

In the end, the AFL-CIO endorsed the pact, as did the U.S. Chamber of Commerce and other major business groups.

Critics said they understood the renegotiated trade deal was an improvement over NAFTA, but they said it wasn’t enough.

“American jobs will still flow to other countries,” said Rep. Bill Pascrell, D-N.J.

The deal gave Democrats a chance to show constituents they weren’t focused solely on impeachment, particularly first-term lawmakers such as Reps. Kendra Horn, D-Okla., and Joe Cunningham, D-S.C. They represent districts won by Trump in 2016.

“I promised the people of the low country I’d come to Washington to work with Democrats and Republicans in Congress, the White House and anyone else necessary to find bipartisan, common-sense solutions to issues impacting our district,” Cunningham said during debate. He said the bills’ passage “is a major step in that direction.”

Republicans made clear that they weren’t going to allow for an easy pivot.

“The bipartisan nature of this deal that we are here discussing today cannot cover up what happened on this floor last night,” said Rep. Liz Cheney, R-Wyo.

Some Republicans also grumbled that Democrats took too long to get the agreement across the finish line, but many were quite happy with the result.

Rep. Mike Kelly, R-Pa., said the pact reminded him of when he would write a letter to Santa, and it would be answered with most of the presents he wanted on Christmas morning.

“This is certainly one of those times when the letter to Santa Claus actually got answered,” Kelly said.

___

AP Economics Writer Paul Wiseman contributed to this report.