A Yemeni journalist who was kept in prison for years at the apparent request of the Obama administration has been released in the Yemeni capital of Sana'a, according to local reports.

Abdulelah Haider Shaye was imprisoned in 2010, after reporting that an attack on a suspected al-Qaida training camp in southern Yemen for which the Yemeni government claimed responsibility had actually been carried out by the United States. Shaye had visited the site and discovered pieces of cruise missiles and cluster bombs not found in Yemen's arsenal, according to a Jeremy Scahill dispatch in the Nation.

Shaye was arrested in August 2010 and charged, the following month, with being an al-Qaida operative himself. He was known for his ability to make contacts with extremist groups, skills that led to regular work reporting for western media outlets such as ABC News and the New York Times. At his trial, his reporting work was marshaled as evidence of terrorist ties. In January 2011, he was sentenced to a five-year term.

The charges against Shaye provoked an outcry among tribal leaders, human-rights activists and fellow journalists. Bowing to the pressure, then-president Ali Abdullah Saleh pardoned Shaye weeks after his sentencing. But in a February 2011 phone call with Saleh, President Barack Obama "expressed his concern over the release" of Shaye. The pardon was revoked.

President Abed Rabbo Mansour Hadi reversed that decision in May, issuing an order to release Shaye "soon", according to the London Times correspondent Iona Craig, who covered the case extensively. "Soon" turned out to mean two months.

As a condition of his release, Shaye is required to stay in Sana'a for two years, according to local reports. A photograph circulating on Twitter showed him smiling after nearly three years of detention.

The White House had no immediate comment on the release.