For nearly two months all eyes were turned to John Greyson and Tarek Loubani, the Canadian activists held in an Egyptian prison before being allowed to return to Canada.

Two other detained Canadians, Greenpeace activists Alexandre Paul and Paul Ruzycki, have also been in the headlines as they remain held in a Russian prison and could face a lengthy prison sentence on piracy charges.

But there are other Canadians detained abroad who don't have such a network of supporters, and fail to capture similar public attention.

Overall, 1,590 Canadians are in prison outside the country, according to figures provided by Canada's Foreign Affairs department, accurate to Oct. 10.

The bulk of them — 1,097 — are behind bars in the United States. The rest are in prisons in more than 85 other countries.

Foreign Affairs wouldn't provide a breakdown on the circumstances or duration of detention, nor how many cases the government is actively contesting.

But human-rights groups continue to monitor a number of cases where they believe Canadians are being wrongly detained or have been the victim of human-rights violations.

Often, it can take years to bring a Canadian back home.

64 months in Iranian prison

Earlier this month, Hamid Ghassemi-Shall was finally able to return to Canada after 64 months in an Iranian prison, including a year in solitary confinement.

Ghassemi-Shall emigrated to Toronto, where he working as a shoe salesman, following Iran's 1979 revolution. He was arrested on espionage charges while visiting his ailing mother in 2008, and faced the death penalty.

International pressure, including a stream of letters from supporters to the Iranian government, may have been a factor in helping to keep him alive, according to Amnesty International Canada.

Each case "has a delicate strategy depending on the circumstances of the case," said John Tackaberry, a spokesman for the human rights group.

All the Canadian government can do is ensure that the person in prison gets fair treatment under the laws of the country where they are. - Eric Morse, Royal Canadian Military Institute

That can mean a public-relations blitz or, alternatively, working quietly behind the scenes.

Most cases don't get nearly as much attention as Greyson and Loubani did, Tackaberry said.

Foreign Affairs Minister John Baird took an active role in the weeks leading up to their release, saying at one point that "Canadians have got to know that their government at the highest levels is doing absolutely everything it can."

"They had a very well-orchestrated social media campaign and a petition with 150,000 signatures," Tackaberry said. Similar cases, meanwhile, can sometimes fail to resonate with the public, he said.

"It has been difficult, in terms of raising public awareness of the issue, getting some coverage of the issues, putting some pressure on behind the scenes, or encouraging the government to get involved."

Rochon said the federal government tries, in every case, to ensure Canadians receive fair treatment under the local criminal-justice system.

But she stressed that the government cannot "seek preferential treatment for you or try to exempt you from the due process of local law."

Travel horror stories

Often, there's not much more the federal government can offer in terms of assistance, according to one former Canadian diplomat.

"All the Canadian government can do is ensure that the person in prison gets fair treatment under the laws of the country where they are," said Eric Morse, now with the Royal Canadian Military Institute.

"Anything else is strictly informal."

Many of the arrests involve drug-related charges, Morse said, and the arrested are often in shock at the situation they find themselves in.

In an effort to dissuade others, the federal government has a collection of wrenching testimonials on its travel-advisory website from Canadians caught trying to smuggle drugs overseas.

Horror stories abound.

One man, who was sentenced to 15 years in a Cuban jail for importing marijuana, says the water was "milky colour and it made me really ill."

A woman who spent a year in a Jamaican prison for trafficking heroin described living in cramped quarters without running water where, as a foreigner, "inmates were constantly trying to pick fights with me."

In cases where Canadians are thought to be unfairly detained, the situation can be made much more difficult when Canada no longer has a diplomatic presence in the country, as in the case of Iran.

Greenpeace activists

Other times, detaining a foreign national can be used to make a broader point at home. Morse suspects that's the case in Russia, where the Greenpeace activists remain behind bars.

In a letter released by Greenpeace this week, Paul described the loneliness of being held in a cold cell with another inmate who doesn't speak any English.

Several of the 30 people arrested, including the captain, have already been denied bail.