Human rights activist Nabeel Rajab freed in Bahrain

Leading human rights activist Nabeel Rajab has been released from prison in Bahrain after three weeks in detention.

It is the second time in two months that Rajab, the Shia president of the Bahrain Center for Human Rights, has been detained and then released. According to the BBC, he was arrested on June 6 after tweeting that the mainly Sunni residents of Bahrain’s third-largest city, Muharaq, had welcomed Prime Minister Khalifa bin Salman Al Khalifa during a visit because he had offered them inducements like subsidies.

More from GlobalPost: Bahrain to pay protesters' families over deaths

Prosecutors subsequently claimed to have received complaints that Rajab – who has organized many pro-democracy demonstrations in the Gulf kingdom – had “talked on social networks about the people of Muharaq in a way that questioned their patriotism and insulted them,” according to the Agence France Presse.

Rajab’s lawyer told the news agency that Rajab is now on trial on four separate charges – two relating to protests and two related to Twitter comments. His next court appearance is set for July 9.

Shortly after his release on Wednesday, Rajab told the Associated Press that he will “keep defending the people’s rights.” At least 50 people have died since February 2011 when an uprising led by Bahrain’s Shiite majority erupted against the kingdom’s Sunni monarchy. 

More from GlobalPost: In Bahrain, life in prison just for protesting