Iran's top court has upheld a death sentence for a Richmond Hill, Ont., resident on charges that he says he confessed to under torture.

Saeed Malekpour, an Iranian-born web programmer who had permanent resident status in Canada, was arrested four years ago and confessed on Iranian television that he developed and promoted porn websites.

Concerns about the safety of Malekpour and two Canadian citizens — Hamid Ghassemi-Shall and Hossein Derakshan — grow as tensions between the West and Iran heat up. All three are being held in Tehran's notorious Evin Prison.

'They are going to torture, they are going to kill, they are going to massacre to keep the people in their place.' —Marina Nemat, former Iranian prisoner

Ghassemi-Shall is in prison and condemned to death for espionage, while Derakhshan is serving a 20-year sentence for his role in helping Iranian dissidents create blogs.

Malekpour, 35, first ran into trouble when he travelled to Iran in October 2008 to visit his ailing father.

Police arrested Malekpour alleging he set up a website that was used to post pornography. He maintains his innocence and claims he was tortured into confessing to crimes against Islam.

His family has said he was only a programmer whose photo uploading software was used by a porn website without his knowledge.

Under international pressure, his original death sentence was suspended and a judicial review ordered. But with the war of words intensifying between the West and Iran, this week Malekpour was put back on death row.

'A ragdoll in the middle'

Maryam Nayeb-Yazdi, a Toronto-based human rights activist, fears the voices calling for his release have been lost amid the sabre-rattling. "It's unfortunate for Saeed. He's just like a ragdoll in the middle."

She said the charges against him are ridiculous and include "corrupting the Earth." The timing of Malekpour's execution is unknown, she said. 

"It could happen tomorrow, it could happen next week, it could happen two months from now."

Nayab-Yazdi said it's up to the Canadian government to step in. "He was a Richmond Hill resident. He was living here and contributing to society."

Foreign Minister John Baird condemned the decision to execute Malekpour and said the concern over the regime in Tehran increases daily.

"Iran is the greatest threat to peace and security in the world today," he said. "Their nuclear program is deeply disturbing, their deteriorating human rights regime in Iran causes great concern."

However, the department would not say directly Wednesday what, if anything, is being done to help Malekpour and the others.

Iran election complicates matters

Marina Nemat, who wrote a book about spending time in Evin prison for protesting during the 1980s, said the international pressure on the Iranian government could hurt Malekpour, especially with an Iranian parliamentary election set for March.

"When you corner a dictatorship, the more helpless they feel, the more violent they get," she said. "They are going to torture, they are going to kill, they are going to massacre to keep the people in their place."

Nemat said Malekpour has been in solitary confinement for 19 months. "I was in solitary for maybe three months and I almost lost my mind," she said.

Nemat says during the Iran-Iraq war, the regime executed thousands of prisoners to keep political dissenters in line.

She and Nayeb-Yazdi worry that the regime will execute Malekpour for an internet crime to make the point to dissenters that the web is not a safe place for them to hide.

"The Iranian regime wants to silence these protesting voices and the only way to do it is block the internet as much as possible," Nayeb-Yazdi said.