Bahraini human rights activist Nabeel Rajab arrives for his appeal hearing at court in Manama, February 11, 2015. REUTERS/Hamad Mohammed/File Photo

DOHA (Reuters) - A leading Bahraini human rights activist who is on trial for tweets alleging rights abuses was to be freed on bail on Wednesday after months in detention, but was immediately re-arrested in a separate case.

Nabeel Rajab, one of the most prominent rights activists in the Arab world, tweeted that he had been released after a court session and would return to court on Jan. 23.

But hours later, Bahrain’s public prosecutors said on Instagram that he would remain in custody while another investigation continued into his publishing “false and malicious rumors that undermine the prestige of the kingdom”. They gave no further details.

Rajab was arrested in June after tweets from his account suggested that security forces had tortured detainees in a Bahraini prison and on a military campaign in Yemen by a Saudi-led coalition that includes Bahrain.

Rights groups say the Sunni-ruled Gulf kingdom, which denies systematic rights abuses, has stepped up a crackdown on dissent, and the United States has called for Rajab’s release.

He is also under investigation for writing in the French newspaper Le Monde that Western countries should reconsider their support for Gulf Arab monarchies because they were fuelling Islamist extremism. Bahraini authorities said the article contained “false rumours” about Gulf Arab states.

Rajab played a leading role in demonstrations driven by Bahrain’s Shi’ite Muslim majority in 2011 demanding political reforms.

Bahrain, where the U.S. Navy’s Fifth Fleet is based, quelled those protests, but has since struggled to resolve a political deadlock between government and opposition.