U.S. President Barack Obama thanked Canadians on Friday for their hospitality and support in the wake of the 9-11 attacks, recalling the "comfort of friendship and extraordinary assistance" in a letter to Prime Minister Stephen Harper.

"It is often said that the United States and Canada are great neighbors, trading partners and the best of friends," Obama wrote in a letter that was delivered to the prime minister on Friday. "In one of the darkest moments in our history, Canada stood by our side and showed itself to be a true friend."

Echoing remarks made earlier in the day by the prime minister, Obama cited both Vancouver and Gander, N.L., the small town that took in more than 6,500 airline passengers after their flights were diverted from the east coast. Vancouver took in another 8,500 people.

"For the next three days -- before our airspace was reopened -- those displaced passengers were treated like family in Canadian homes, receiving food, shelter, medical attention, and comfort."

Harper recalled Gander's efforts earlier Friday when he called on Canadians to mark Sept. 11 as a "National Day of Service" in memory of the terrorist attacks in the U.S. and Canada's efforts to lend aid in their wake.

The move was announced by Associate Defence Minister Julian Fantino in Ottawa.

"We all remember where we were when the planes hit; when this unimaginable use of violence was used to commit mass murder and create an atmosphere of fear," Fantino told reporters.

"Yet in the immediate shock that followed these horrible events, Canadians as individuals and communities, responded with incredible acts of kindness and of courage," he added, singling out the residents of Gander.

"People prepared food. They set up shelters in schools and churches. Local businesses donated all the basic necessities. And many residents welcomed strangers into their homes and made them like family," said Fantino.

Gander also received an international resiliency award at a day-long event in Washington for its efforts.

The prime minister added in a statement that the anniversary of the attacks will henceforth be a day on which Canadians should focus on "people helping people and neighbours getting together as a community."

"It is a fitting way to pay tribute to the Canadians and others who were lost in 9-11, to show continued support for the families of victims, to honour the sacrifices made by those who served in the rescue efforts, and to turn an infamous date into a day of hope marked by a communal outpouring of warmth and generosity," said Harper.

Harper will be in New York to mark the anniversary, remembering the 24 Canadians who died in the attacks in private meetings with their families there and attending an event at New York's Hanover Square, a memorial to the attack's British victims. Fantino will attend ceremonies marking the occasion in Ottawa.

Speaking in New York on Friday, Defence Minister Peter MacKay said the ties between Canada and the U.S. have strengthened and evolved since the attacks as Canadians have heeded the concerns of their southern neighbours.

"As we all know, even the closest relationships need care, nurturing and constant attention," MacKay told a conference of the Foreign Policy Association.

"Since 2001, we have been paying particular attention to the concerns, challenges, fears and expectations of our closest friend -- the United States," he added.

Both countries are in talks on improved border security, with word on the so-called Beyond the Border initiatives expected sometime this fall. MacKay said the new initiatives will help officials Canadian and U.S. officials identify and address threats early by improving screening procedures of individuals and cargo entering North America, as well as enhancing cross-border law enforcement.

With files from Canadian Press