WASHINGTON — Senate Majority Leader Mitch McConnell, R-Ky., on Tuesday cast deep doubt on winning approval for President Obama’s trade agenda during his last weeks in office, suggesting that it will be up to the next occupant of the Oval Office to determine the direction of trade policy.

Acknowledging publicly what had become increasingly clear in private, McConnell said that the presidential campaign had produced a political climate that made it virtually impossible to pass the Trans-Pacific Partnership in the “lame duck” session after the November elections.

“The chances are pretty slim that we’d be looking at that this year,” McConnell told reporters at his weekly press briefing.

Both Hillary Clinton, the presumptive Democratic nominee, and Donald Trump, the presumptive Republican nominee, are opposed to the trade deal involving 12 Pacific-rim nations. Trump, abandoning Republican orthodoxy of the past 50 years, has made an anti-trade message a cornerstone of his campaign, stunning party leaders such as House Speaker Paul Ryan, R-Wis., who had recently helped write new rules that created a fast-track process for considering TPP and other trade deals.

Clinton, who as secretary of state helped negotiate the Pacific pact and once called it the “gold standard” of deals, abandoned her support for TPP during her tough primary campaign against Sen. Bernie Sanders, I-Vt., whose populist campaign regularly excoriated her for previously backing the trade deal. After weeks of withholding his support, Sanders finally endorsed Clinton at an event in Portsmouth, N.H., on Tuesday.

Moreover, the incoming Democratic leader, Sen. Charles E. Schumer of New York, pledged to not allow the trade pact in its current form to come up for a vote if his party wins enough seats in November to make him majority leader next year.

“I think we need to dramatically readdress how we talk about and what we do about trade, OK. It’s not working,” Schumer said, distinguishing his views from Trump’s support for unilateral abandonment of already existing trade pacts. “I don’t support what Trump has suggested, but we need a revamp of that issue. It is not working.”

Trump and Sanders gave prominent voices to the view of many voters in onetime manufacturing plants that their jobs disappeared after trade deals with Mexico, China and other nations with low-wage workers.