U.S. President Barack Obama today thanked Canada for its role in helping the United States and Cuba thaw their relations.

Canada helped the U.S. and Cuba begin their reconciliation, American officials said earlier, by hosting gatherings of officials from the two countries.

Prime Minister Stephen Harper congratulated the two countries for their "successful dialogue" in a statement Wednesday, saying "Canada supports a future for Cuba that fully embraces the fundamental values of freedom, democracy, human rights and the rule of law."

"Canada was pleased to host the senior officials from the United States and Cuba, which permitted them the discretion required to carry out these important talks," the statement read.

High-level U.S. officials, on a conference call to brief reporters about the détente, said there were multiple meetings with Cuban officials in third-party countries. Officials said Canada hosted the first face-to-face encounter in June 2013 followed by a series of meetings until as recently as last month.

No meetings were held on American or Cuban territory.

Castro credits Canada

Canada did not participate in the substance of the discussions, but was indispensable in facilitating and hosting the discussions, an official said.

In his statement, Cuban President Raul Castro recognized the support of the Canadian government "for helping realize the high-level dialogue between the two countries."

Mark Entwistle, who was Canada's ambassador to Cuba from 1993 to 1997, said most people have concluded isolating Cuba didn't improve its human rights situation.

"So if it's a failed policy, it hasn't delivered any results, it's a bit empty to argue to continue it. One of the alternatives is to have a more active kind of engagement where you actually can have a active forum to talk about these things," Entwistle told Evan Solomon, host of CBC News Network's Power & Politics.

"It's in the best interest of the United States."

NDP foreign affairs critic Paul Dewar thanked Canada's diplomatic corps for their hard work on the file.

“This is what diplomacy looks like — and Canada is very good at it," Dewar said in a written statement on Wednesday.

Liberal Leader Justin Trudeau recalled the funeral of his father, former prime minister Pierre Trudeau, and seeing former U.S. president Jimmy Carter sitting next to then Cuban leader Fidel Castro. Trudeau said Carter travelled to Cuba for the first time a few months later.

"I think it's very clear that the Liberal Party and Canadians in general have had very positive friendships with both the United States and with Cuba, and to see the welcome steps of building ties between the two countries appear today is a very good piece of news," Trudeau said in Vancouver.

"I look forward to Canada playing a positive role in bringing together those two countries."

Vatican helped facilitate

The Vatican also helped facilitate the reconciliation, which may lead to a resumption of diplomatic relations between the two countries. The Pope personally appealed in writing to Obama and Castro.

The United States and Cuba have been locked in hostilities for more than half a century, starting in 1959 when Fidel Castro overthrew the then government of Cuba, enhanced ties with the Soviet Union and nationalized U.S.-owned properties.

The U.S. has imposed strict trade embargoes on the Caribbean country, located about 150 kilometres south of Florida, since the early 1960s.

The U.S. cut off diplomatic ties in 1961 and then sent a group of CIA-sponsored Cuban exiles to try to overthrow Castro in a failed mission known as the Bay of Pigs invasion.

Cuba remains controversial because of human rights concerns and the lack of democratic elections.