OTTAWA - It happened quietly, almost imperceptibly, while the guns of Afghanistan thundered -- and whether Canadians realize it or not, they exited the war in Kandahar this year more closely tied to the U.S. military than at any point in our history.

The withdrawal from five years of bitter guerrilla warfare with the Taliban was often cast in the light of Ottawa exercising its independence from Washington, which pleaded privately and publicly with the Conservative government not to leave the war-wasted country.

But what has gone largely unnoticed is how feverishly both countries are working toward closer defence co-operation -- especially in light of the recently signed cross-border deal on perimeter security, which is more about borders and commerce.

"We need to explore how we can deepen our defence relationship, particularly through the well-established defence institutions such as NORAD and the Permanent Joint Board on Defense" which encompasses Mexico, said a recently released briefing note to Defence Minister Peter MacKay.

"The defence relationship is, however, heavily weighted towards military-to-military co-operation. This is essential and we should continue to build and strengthen these ties."

The document was written in 2009 for MacKay's meeting with now-retired admiral Mike Mullen, the former chairman of the U.S. Joint Chiefs of Staff. It and a series of other background briefings and position papers, obtained by The Canadian Press under access to information laws, paint a portrait of how defence relations between the two nations have evolved under the Harper government.

Retired major-general Lew MacKenzie was intrigued by the statement and said there isn't much more room for the two countries to "get further into each other's pockets," given the myriad of exchange programs and sharing arrangements.

Most significantly, in 2008, Ottawa and Washington quietly signed an agreement to support each other's military during floods, forest fires, hurricanes, earthquakes and after a terrorist attack.

Both MacKenzie and McGill University historian Desmond Morton say what is likely at play is the solidifying of Canada's defence posture around the U.S. in ways that may have been unimaginable before the Afghan war.

Canada rushed to the defence of Britain in the two world wars and found itself lashed to NATO during the Cold War, said Morton.

"But why were we in Afghanistan before anybody else? It wasn't 9-11, it was 9-12 we cared about when the border was jammed shut."

The Liberal government under Jean Chretien snubbed Washington by refusing to participate in the Iraq war without a United Nations mandate, and had consistently embraced multilateral institutions including NATO.

But MacKenzie argues that disappointment with the "dysfunctional nature" of the North Atlantic alliance and the way Canada was left to fight on largely alone in Kandahar contributed to a sense of disillusionment.

Further embracing the Americans is something Canada "is doing perhaps by default because of our frustration," MacKenzie said.

"As an independent country, we can pick and choose if it's in our national interest to participate. And I don't think it's a surprise to anyone that it might in our national interest many times over to support the Americans."

That has always been true to a certain extent, said Morton, but Canada has been largely successful in avoiding American entanglements such as Vietnam, choosing instead to steer a course as an international honest broker.

It is an image in which the country has long taken quiet pride. Generations of Canadian military officers and diplomats have been able to build bridges with rivals and outright enemies of the U.S. because of that reputation.

That sentiment was on full display in another briefing note, where MacKay made it clear to Robert Gates, the former U.S. defence secretary, that Ottawa stood ready to help the newly-elected U.S. President Barack Obama's soothing overtures to a rapidly nuclearizing Iran.

"As you are aware, Canada has diplomatic relations with Iran and would be prepared to explore how we could assist the U.S. in any new policy initiative aimed at the proliferation threat we collectively face," said the undated document, which was attached to an assessment of U.S. defence strategy.

But critics say the reasonable intermediary image has been tarnished -- if not eviscerated -- in the Arab world as a result of the current Conservative government's open support of Israel.

The good intentions might have made no difference with Iran as the hard-line regime inches toward its goal of going nuclear despite world condemnation.

The fact a Canadian general led the international bombing and sea campaign against Libya is a particular point of pride for the government, and many experts agree that it represents the emergence of a different Canadian engagement.

Rather than opening doors for the U.S., Canada is now trusted to kick them down.

Hints at how far Ottawa is prepared to go in order to stay in Washington's good graces can be found in another issue that has largely flown below the radar.

Canada was a signatory in 2008 to the Convention on Cluster Munitions, essentially banning the use of weapons that scatter little bomblets around the battlefield and elsewhere.

It has yet to ratify the treaty and a 2009 briefing note to MacKay illustrates the heart of Ottawa's reluctance.

"We recognize the importance of the depth and breadth of our military co-operation with the United States, including our high-degree of interoperability and senior exchange program," said the document.

"We do not want to jeopardize this relationship and have been actively engaged with State and Defence officials, mostly recently in Washington on February 6, to discuss the potential impact of Canada's implementation of the convention."

The treaty was opposed by a number of countries that produce or stockpile significant quantities of cluster munitions, including the United States, China, Russia, India, Israel, Pakistan and Brazil.

During the negotiations, Canada was among several nations that pushed for the insertion a provision that allowed signatory nations to co-operate militarily with non-signatory nations.

Infighting between Foreign Affairs and National Defence spilled out in public last spring when the diplomat Earl Turcotte, a leading disarmament negotiator, resigned over his concern that the provision would essentially allow Canada to "`aid and abet" the continued use of cluster bombs.

"It seems I've had a bit of a falling out with a senior manager over a conscientious objection I have brought forward concerning the proposed Canadian interpretation of one of the critical elements of the Convention on Cluster Munitions," Turcotte wrote in a widely disseminated farewell email, a copy of which was obtained by The Canadian Press.

"As well as over recent complaints from the U.S. and at least one other country (not identified to me) that I have been `too tough and aggressive' in negotiations.

"Apparently my actions have not been what is expected of a close friend and ally."

As of the fall, the federal cabinet had not approved ratification and no legislation has been introduced to enact the treaty.

Another issue where Ottawa has demonstrated its faithfulness is the planned purchase of the F-35 stealth fighter -- the nearly trillion dollar U.S. defence program to replace entire fleets of existing warplanes.

The Harper government signalled in July 2010 its intention to spend up to $16 billion on the radar-evading fighter and has stood by the decision through a blizzard of political criticism, growing technical concerns, cost-overruns and delays.

Canada has been so stalwart in its support that even U.S. editorial pages and columnists have taken note.

It has been particularly stark when some of the program's biggest supporters, namely U.S. Senator John McCain, have been merciless in their criticism.

MacKenzie said such blind acceptance "could be quite an embarrassment for us in the immediate future."

The government faces political "Chinese water torture" with each new problem, he said.

"At some stage, they're going to have to admit this contract is in serious trouble and not only that, it is not the aircraft to fulfil our primary responsibility," MacKenzie said.

"I'm amazed they're maintaining their current position this long with this."

While the need to replace the CF-18s is evident, MacKenzie said the military needs a mixed fleet or fast jets and attack helicopters to carry out future missions.

Rolling everything -- interception and ground attack -- into one plane is a mistake, he said.