DUBAI, United Arab Emirates (AP) — An Iranian-American serving an 18-year prison sentence in Iran for "collaboration with a hostile government" has been released on bail after staging a weeks-long hunger strike protesting his imprisonment alongside other dual nationals targeted by hard-liners, activists said Monday.

Robin Shahini of San Diego was freed from prison in recent days on bail of 2 billion rials, which is about $62,000, said Hadi Ghaemi, the executive director of the New York-based Center for Human Rights in Iran.

It's unclear whether Shahini can leave the country.

"Shahini's release on bail is good news as his prosecution did not produce any credible evidence justifying charges against him," Ghaemi told The Associated Press. "He is an innocent man who appeared to be in the wrong place at the wrong time and his detention and prosecution was motivated by his dual nationality more than anything else."

Iranian officials and state media did not comment on Shahini receiving bail. The Iranian mission to the United Nations and the U.S. State Department did not immediately respond to requests for comment.

Shahini, who traveled to Iran to see his mother who was diagnosed with Alzheimer's disease, was detained on July 11. He left Iran in 1998 and has lived in San Diego for 16 years. He graduated in May 2016 from San Diego State University with a degree in International Security and Conflict Resolution and had been accepted to SDSU's graduate program in Homeland Security.

At his trial, prosecutors apparently used social media pictures of Shahini standing near prominent Iranian exiles to secure his conviction. Hard-liners have been using such cases to challenge the administration of moderate President Hassan Rouhani ahead of the country's coming May presidential election. Rouhani is expected to run in the vote next month.

Iran does not recognize dual nationalities, meaning that those it detains cannot receive consular assistance. In most cases, dual nationals have faced secret charges in closed-door hearings before Iran's Revolutionary Court, which handles cases involving alleged attempts to overthrow the government.

Story continues

Analysts and family members of those detained have suggested that hard-liners in the Islamic Republic's security agencies want to negotiate another deal with the West to free the detainees. A prisoner exchange in January 2016 that freed Washington Post journalist Jason Rezaian and three other Iranian-Americans also saw the U.S. make a $400 million cash delivery to Iran the same day.

Among the dual national held are Iranian-American businessman Siamak Namazi and his octogenarian father, Baquer Namazi, who are serving 10-year prison sentences for "cooperating with the hostile American government." Another is Nazanin Zaghari-Ratcliffe, a British-Iranian woman sentenced to five years in prison on allegations of planning the "soft toppling" of Iran's government while traveling with her young daughter.

Yet to be tried is Iranian-American Karan Vafadari, an art gallery manager held along with his Iranian wife. Iranian-Canadian national Abdolrasoul Dorri Esfahani, a member of the country's team that negotiated the nuclear deal, is believed to have been indicted.

Still missing is former FBI agent Robert Levinson, who vanished in Iran in 2007 while on an unauthorized CIA mission.

Shahini began a hunger strike on Feb. 15 to contest his incarceration.

"My only sin was that as a responsible human being, I expressed my views about my homeland, which is the right of every citizen," he wrote in a letter to his family published by the Center for Human Rights in Iran. "Don't let me remain in this prison as an innocent man."

Related:

For more news videos visit Yahoo View, available now on iOS and Android.

___

Follow Jon Gambrell on Twitter at www.twitter.com/jongambrellap . His work can be found at http://apne.ws/2galNpz