In a cross-border political attack,said Friday that 's opposition to the North American Free Trade Agreement is "nothing more than retreating behind protectionist walls."
The Republican presidential nominee-in-waiting added that if he wins the White House, "have no doubt that America will honor its international commitments and we will expect the same of others."
McCain did not mention Obama by name as he spoke before the Economic Club of Canada, a business organization whose membership cheered his remarks.
His trip to Canada was unusual if not unprecedented for a presidential candidate, one that his campaign paid for yet aides insisted was not political.
Democrats criticized plans for a scheduled $100-per-person "finance event," and raised questions about U.S. Ambassador David Wilkins' involvement in the trip. McCain's aides said Wilkins had done nothing wrong. They also countered that the money was to pay the cost of the Economic Club luncheon then canceled the event without explanation.
The free trade agreement is intensely controversial in the United States supported by most businesses, opposed by many unions and has already emerged as a flashpoint in the presidential race.
McCain supports it, while Obama and former rival Hillary Rodham Clinton vied for support among blue-collar workers in the Democratic primaries by stressing their desire to force changes.
"Since NAFTA was concluded, it has contributed to strong job growth and flourishing trade. Since the agreement was signed, the United States has added 25 million jobs and Canada more than 4 million," McCain said.
In an unmistakable reference to Obama, he added, "Demanding unilateral changes and threatening to abrogate an agreement that has increased trade and prosperity is nothing more than retreating behind protectionist walls."
Aides said that was a reference in part to comments the Illinois senator had made in a Feb. 26 debate during the primaries.
"I will make sure that we renegotiate in the same way that Senator Clinton talked about," he said at the time. "... I think we should use the hammer of a potential opt-out as leverage to ensure that we actually get labor and environmental standards that are enforced."
In his speech, McCain expressed his appreciation for Canada's deployment of 2,500 troops to Afghanistan, and skipped lightly over Iraq, where the government declined to send forces.
"... This nation has done all that those differences would allow to help the Iraqi people. In characteristic form, Canada has given generous humanitarian aid and development assistance," he said.
Later, at a news conference, he said he hoped officials from the two countries could resolve the issue of Omar Khadr, a young Canadian citizen who is imprisoned at Guantanamo as a detainee in the war on terror.
"I have always opposed torture and any interrogation technique that would be constructed in any way as torture," McCain added, unprompted.
McCain has made several trips outside the United States since he became a presidential contender, including European and Middle Eastern countries.
He arrived in the Canadian capital aboard his chartered campaign jet and was greeted on the tarmac by Wilkins. The senator said it was not a political journey, yet told reporters he did not feel it was appropriate to have U.S. taxpayers pick up the cost.
McCain was still on Canadian soil when the Democratic National Committee filed a Freedom of Information Act request with the State Department seeking information about possible violations of federal law in connection with the trip. Under the law, federal officials are limited in their ability to undertake political activity.
Aides said in advance McCain would come to Canada to highlight trade, and there has been widespread speculation that he will soon travel to Mexico and perhaps elsewhere to make the same point as he made before his lunchtime audience.
"Last year alone, we exchanged some $560 billion in goods, and Canada is the leading export market for 36 of the 50 United States," the Arizona senator said.
"This country stands as America's leading overall export market, and America is Canada's leading agricultural market. With 60 percent of all direct foreign investment in Canada originating in the United States some $289 billion in 2007 our economies draw strength from one another."
He also said improvements are needed.
"Complying with NAFTA's rules of origin can be cumbersome and costly. Border delays can pose a serious impediment to trade, the equivalent of a tariff," he said.