Salih told a government-named dialogue commission that he was pardoning al-Khaiwani, whose one-year jail sentence was upheld by an appeals court on Tuesday, a member of the committee said, requesting anonymity.
The commission, comprising 30 Muslim scholars and headed by a judge, seeks to reform suspected extremists and returnees from Afghanistan and move them away from violence.
Al-Khaiwani, who has been in jail since early September, is editor of the opposition weekly Al-Shura, which was ordered to suspend publication for six months. The period has elapsed, but the weekly has yet to resume publication.
It has been replaced by another weekly, Sawt al-Shura.
Violence and defamation
Salih's surprise decision came one day after the head of the appeals court, Judge Hammud al-Hirdi, rejected a request to suspend the one-year sentence handed down to al-Khaiwani after he was convicted of inciting violence, defaming Salih and publishing false news.
Al-Khaiwani's case is linked to an armed struggle waged by a Zaidi preacher, Shaikh Husain Badr al-Din al-Huthi, in northwest Yemen last year.
The Yemeni government announced on 10 September 2004 that the army had killed al-Huthi nearly three months after he started an uprising in a mountainous region near the border with Saudi Arabia, triggering clashes which left more than 400 people dead.
Al-Khaiwani, himself a member of the Zaidi sect, a moderate Shia Muslim group dominant in the northwest but in the minority in the mainly Sunni country, defended al-Huthi throughout the conflict and was bitterly critical of the government's handling of the rebellion.
He went so far as to lash out at the family of the Yemeni president.
But fellow journalists were as shocked by the way al-Khaiwani, who is in his forties, was treated as by his incarceration.
Immediately after al-Khaiwani's conviction, his lawyer announced that he would appeal the verdict. But al-Khaiwani was hauled away the same night by police.
The appeals court had been due to rule in the case on 2 March.
But at the time the court president ordered the public to vacate the premises minutes after the session began. Several lawyers and journalists were beaten up in the process, witnesses said.
Al-Khaiwani has been seen by human rights groups as a symbol of the problems facing Yemeni journalists, and his case did not go unnoticed by Western countries with whom Yemen has been forging close ties.
US Undersecretary of State for Global Affairs Paula J Dobriansky said she had raised the issue with her Yemeni hosts during a visit to Sanaa last month.
On 26 December 2004, five journalists received suspended jail sentences of between three and six months. Four of them were indicted for harming Yemen's relations with neighbour Saudi Arabia.