U.S. Senator John McCain delivered a strong defence of the North American Free Trade Agreement before some of Canada's most influential political and business people Friday.

He took a detour from his presidential campaign and went to Ottawa to address the Economic Club of Canada.

"There aren't any votes to be won up here," he told the audience before setting out on a speech outlining the importance of Canada and U.S. relations, particularly in the economic sphere.

Although he did not refer directly to his presidential rival Barack Obama, McCain alluded to the Democrat's criticism of NAFTA.

"Demanding unilateral changes and threatening to abrogate an agreement that has increased trade and prosperity is nothing more than retreating behind protectionist walls," he said.

McCain said if he is elected president, he will respect international agreements. Obama criticized the economic pact during his Democratic primary battles with vanquished leadership contender Hillary Clinton. Both the presumptive presidential nominee and the former first lady campaigned promising they would seek changes in the pact.

McCain said NAFTA has helped American and Canadian businesses and workers.

"Since the agreement was signed, the United States has added 25 million jobs and Canada more than four million," he said.

"We have established North America as the world's largest economic market and the integration of our economies has led to greater competitiveness of American and Canadian businesses. Because of our common market, our workers are better able to compete, and to find opportunities of their own in the global economy."

The audience applauded McCain when he said the U.S. prison at Guantanamo Bay, Cuba, was a "liability" and that he would shut it down if elected. The prison holds non-American terrorism suspects and Afghan Taliban fighters. It also holds Canadian Omar Khadr, who was captured in 2002 allegedly fighting U.S. troops in Afghanistan. At the time, he was just 15.

Asked about Khadr in a question-and-answer session after his speech, McCain began his answer by noting that Canada's Conservative government has not asked for the former child soldier's return.

He then said he hoped that "we can comply with whatever is agreed to by the Canadian government and then I think is the time to move forward."

McCain also thanked Canadians for helping Americans after the September 11 attacks and for sending troops to Afghanistan. In a speech that touched on the long history of Canadian-U.S. cooperation, McCain noted the common values the two countries share.

"What a blessing it is for the United States to have in Canada a neighbour we fear only on ice rinks and baseball diamonds," he said.