TEHRAN, Iran — Iran ignored appeals by Hillary Rodham Clinton and even rock star Sting and sentenced an Iranian-American academic to 12 years in prison Tuesday for his alleged role in anti-government protests after the country's disputed presidential election.

The sentence for Kian Tajbakhsh was the longest prison term yet in a mass trial of more than 100 opposition figures, activists and journalists in the postelection turmoil.

At the same time, Iran allowed another defendant to leave the country — Canadian-Iranian Maziar Bahari, a Newsweek journalist arrested in the same crackdown who had been freed on bail over the weekend.

Bahari joined his British wife, who is in the last days of her pregnancy, in London, Newsweek said on its Web site Tuesday. It was the first word that Bahari had left Iran.

The circumstances of his return to London were not immediately known, but it is unlikely he could have left without the consent of Iranian authorities. Newsweek refused further comment, and Iranian officials could not be reached for explanation.

"We can only imagine what Mr. Bahari has been through during the past months and the anguish that his wife has experienced during this difficult period," Canadian Prime Minister Stephen Harper said in a statement. "Canada commends all journalists who risked their lives by reporting on the Iranian elections from within the country."

Hard line on protests
Bahari's release could be a concession by Iran to international pressure. But Tajbakhsh's heavy sentence signaled that Tehran was sticking to a tough line overall on the political unrest. It came amid calls in Iran for the prosecution of the most senior opposition figure and suggestions that three American hikers, detained after accidentally crossing into Iran, could face charges.

Tajbakhsh, a social scientist and urban planner, was arrested by security forces at his Tehran home July 9 — the only American detained in the crackdown that crushed giant street protests by hundreds of thousands of people after the June 12 election. The opposition claims the vote was rigged in favor of President Mahmoud Ahmadinejad.

The security sweep went far beyond protesters on the streets, snatching up rights activists and journalists, as well as pro-reform politicians. The government accused them of organizing the protests on behalf of Iran's foreign enemies to foment a "velvet revolution" to overthrow the Islamic leadership.

In Washington, State Department spokesman Ian C. Kelly said Tajbakhsh should be released immediately, saying he poses no threat to the Iranian government or its national security.

Washington has repeatedly denounced his arrest. Secretary of State Hillary Rodham Clinton appealed in August for his release, and he was specially named in a call by the British rock star Sting to free all political prisoners in Iran.

Shock and outrage
"Family and friends of Iranian-American detainee Kian Tajbakhsh are shocked and outraged by the news," said Pam Kilpadi, a friend of Tajbakhsh who is working on a book with him. She described the charges as "baffling."

"As an independent scholar Kian is neither a member of the Iranian reformist movement nor in contact with any foreign headquarters inside or outside Iran, and has had no involvement in pre- or postelection unrest," said Kilpadi, a doctoral researcher at Britain's University of Bristol currently based in Cambridge, Mass.

Tajbakhsh's lawyer, Houshang Azhari, told the official IRNA news agency that he would appeal the conviction on charges of "acting against national security." He said the law prohibited him from divulging the full details of the sentence and would only say it was "more than 12 years."

The appeal could open an avenue for freeing Tajbakhsh. An Iranian-American journalist who was arrested this year, Roxana Saberi, was convicted of espionage but freed on appeal in what was widely seen as a political decision to defuse tensions with Washington.

Arrested in 2007
Tajbakhsh, 47, had been targeted by Iranian authorities before. In 2007, he was arrested on similar charges while working for the Open Society Institution, a pro-democracy organization run by American philanthropist George Soros — a figure Iran has often cited as part of the anti-government plot. He denied the charges and was released after four months in prison.

Afterward, Tajbakhsh left the Open Society Institution and remained with his family in Iran, working on a book.

Weeks after his arrest in July, Tajbakhsh appeared in the mass trial of opposition figures. Many of the defendants delivered courtroom confessions to a plot to topple the government — admissions that opposition groups said were forced from them.

At his turn to speak during an Aug. 25 court session, Tajbakhsh appeared to try to speak only vaguely about foreign interference in Iran, saying that "undeniably this was a goal of the U.S. and European countries to bring change inside Iran" — although he said he had no direct knowledge of any plot.

The court has issued convictions against a few Iranian opposition figures, sentencing them to five or six years — all far shorter than Tajbakhsh's, although three others accused of belonging to what Iran considers terrorist groups were sentenced to death.

'Politically motivated'
"It's obviously completely politically motivated," said Arien Mack, a psychology professor at The New School in New York City, where Tajbakhsh taught urban policy until 2001. She said that since his 2007 arrest, Tajbakhsh had focused on his academic work, avoiding politics.

"As far as I know, he did not even vote in the last election" in Iran, she said.

In addition to Tajbakhsh, Iran holds three American hikers — Joshua Fattal, Shane Bauer and Sarah Shourd, who were detained in July after straying across the border from Iraq.

Iranian Foreign Minister Manouchehr Mottaki said Tuesday that investigators are still questioning the three and that their fate rests with judicial authorities.

Mottaki gave no other details on the case. But his comments suggested that formal charges could still be possible against the Americans, although Ahmadinejad said in an interview with The Associated Press last month that could ask the judiciary to "take a look at the case with maximum leniency."

They three have been visited by Swiss diplomats who oversee U.S. interests in Iran, and earlier this month, their relatives presented a petition to Iran's U.N. mission in New York asking for their release.

Mousavi spared, so far
Despite the crackdown, the government has stopped short of indicting the most visible leaders of Iran's opposition reformists, presidential candidates Mir Hossein Mousavi and Mahdi Karroubi, but there have been signs in recent weeks that could change.

Last week, authorities opened an investigation into Karroubi, a possible first step to bringing charges.

On Tuesday, a third of the 290 members of parliament demanded Mousavi be prosecuted. The opposition claims Mousavi is the rightful winner of the election, and his arrest would sharply escalate the confrontation between the reform movement and the government.

According to IRNA, 100 hard-line lawmakers sent a letter to State Prosecutor Gholam Hossein Mohseni Ejehi saying Mousavi should go on trial because his statements and actions had damaged the "reputation of the Islamic system."

Copyright 2009 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.