(CNN) President Barack Obama laid into Donald Trump's protectionist trade stance Wednesday, blasting the presumptive Republican nominee's call for a withdrawal from trade deals as the "wrong medicine."

Obama's comments, which came during a trip to Canada to meet with his fellow North American heads of state, came as Trump fights a public war with the business lobby over the issue.

"Ordinary people who have concerns about trade have a legitimate gripe about globalization," Obama continued, pointing to "growing inequality and stagnant wages."

"The question is, what do you do about it. And the prescription of withdrawing from trade deals and focusing solely on your local market -- that's the wrong medicine," he said.

Obama called the idea "not feasible" because local businesses would suffer and lose jobs if they didn't have access to international markets and because the costs of local goods would rise.

Trump, speaking at a rally in Bangor, Maine, focused his fire on the U.S. Chamber of Commerce, saying they are "totally controlled by the special interest groups ... they want to have the deals they want to have."

"The @USCHAMBER must fight harder for the American worker. China, and many others, are taking advantage of U.S. with our terrible trade pacts." Trump also took on the Chamber earlier in the day, tweeting "The @USCHAMBER must fight harder for the American worker. China, and many others, are taking advantage of U.S. with our terrible trade pacts."

Trump plans to press ahead with his anti-free trade message in a speech in New Hampshire set for Thursday afternoon. Powerful business lobbies -- both traditionally supportive of Republican candidates -- took the highly unusual step of lashing out at Trump during a speech he gave Tuesday that hammered U.S. free-trade deals.

"Under Trump's trade plans, we would see higher prices, fewer jobs, and a weaker economy," the Chamber tweeted during Tuesday's speech in Monessen, Pennsylvania, linking to an analysis that argues Trump's trade positions would throw the United States into an economic recession.

Under Trump's trade plans, we would see higher prices, fewer jobs, and a weaker economy https://t.co/3xcCNgiS2k pic.twitter.com/9jPtGXAOlQ — U.S. Chamber (@USChamber) June 28, 2016

And the Chamber kept up its attacks on Trump Wednesday.

"The U.S. Chamber represents American businesses of all sizes from across the country, who recognize that free trade agreements, like the (Trans-Pacific Partnership), are an important way to accelerate economic growth and spur job creation in the U.S.," Blair Latoff Holmes, a spokesman for the Chamber, said in a statement. "This is not personal. It's not election politics. It's smart policy."

A break between traditional allies

The onslaught reflected a major break between right-leaning business interests and the party's 2016 presidential nominee and demonstrate the possible downside to Trump of running as a protectionist Republican. It also comes as Trump attempts to ramp up fundraising -- a challenge that could prove more difficult if the party's business backers decide to back Hillary Clinton or focus their money on assisting down-ballot Republicans.

Clinton's campaign released a statement as well, saying Trump's speech rejected "the idea that Americans can compete and win in the global economy," and went point-by-point disputing Trump's arguments or made the case with past Clinton statements that she had better ideas.

"Throughout this campaign, Trump's statements on trade, like everything else he says, have been erratic and irresponsible, full of bluster and the promise of a reckless trade strategy that would put American jobs at risk," Clinton's statement said.

Trump has broken from Republican orthodoxy and embraced a protectionist trade stance that more closely mirrors liberals such as Vermont Sen. Bernie Sanders.

The real estate mogul has opposed the Trans-Pacific Partnership, and on Tuesday said he'd seek to withdraw the United States from the North American Free Trade Agreement -- a move that would result in the upheaval of economies across the continent.

Trump argued that by doing so, he'd create more manufacturing jobs in the United States -- a key element of his appeal to white, working-class communities in swing states such as Ohio, Pennsylvania and Michigan.

"Why would the USChamber be upset by the fact that I want to negotiate better and stronger trade deals or that I want penalties for cheaters?" Trump also tweeted Wednesday

Why would the USChamber be upset by the fact that I want to negotiate better and stronger trade deals or that I want penalties for cheaters? — Donald J. Trump (@realDonaldTrump) June 29, 2016

The Chamber rebutted Trump point-by-point, arguing that NAFTA has created 5 million jobs, that the United States is selling more to South Korea since signing a trade deal and that the Trans-Pacific Partnership would add $77 billion to the U.S. economy by 2025.

"Even under best case scenario, Trump's tariffs would strip us of at least 3.5 million jobs," the Chamber tweeted.

Even under best case scenario, Trump's tariffs would strip us of at least 3.5 million jobs https://t.co/3xcCNgiS2k pic.twitter.com/3SSHHqotNv — U.S. Chamber (@USChamber) June 28, 2016

Jay Timmons, the president of the National Association of Manufacturers, also took aim at Trump in a series of critical tweets.

Directing his comments at Trump, he said that "you have it backward" and that "to win, WE need to write rules on trade -- not China."

He also tweeted: ".@realDonaldTrump should understand 40% of manufacturing jobs are related to exports. We need more exports-- not less."

.@realDonaldTrump should understand 40% of manufacturing jobs are related to exports. We need more exports-- not less pic.twitter.com/Hp60LeXGMo — Jay Timmons (@JayTimmonsNAM) June 28, 2016

The Business Roundtable, another leading U.S. business organization representing the CEOs of major companies, also weighed in with a Medium post on what candidates are getting wrong on trade -- though it's much less direct than the Chamber and National Association of Manufacturers attacks.

Asked if the criticism of Trump is an unprecedented step into a presidential race by the traditionally Republican-leaning Chamber, Holmes said in an email Tuesday that "this is about policy, not politics."

"The Chamber has long supported advancing and expanding trade, including TPP," she wrote. "Despite much of the rhetoric we have heard out on the campaign trail, the next president should understand that selling more American-made goods and services around the world is one of the best ways to spur economic growth, support small businesses, create good-paying American jobs, and keep the United States one step ahead of its international competitors.

"After all, 95% of the world's consumers now live outside America's borders, representing nearly limitless expansion opportunities for U.S. businesses and entrepreneurs."

Holmes did pour cold water on the possibility that the Chamber could endorse Clinton in the presidential race despite its opposition to Trump's trade positions.

The Chamber has in the past hit Clinton and Sanders for failing to offer broad enough support for free trade. Clinton has said she, too, opposes the Trans-Pacific Partnership -- a deal negotiated under President Barack Obama, and which Clinton had once called the "gold standard" of trade pacts during her tenure as secretary of state.

But free trade critics point out her husband, Bill Clinton, was responsible for implementing NAFTA -- the first mega-regional trade deal.

"For 104 years, the US Chamber has never gotten involved in a presidential race, and we do not plan to," Holmes said.

Holmes quickly followed up to signal that the Chamber's criticism of Trump's trade positions won't soon be ending.

"I want to add that while we don't engage in presidential politics, we've also never hesitated to engage in a policy discussion," she said.