Bahraini human rights campaigner Nabeel Rajab has been pardoned by King Hamad after serving three months of a six-month jail sentence, the official BNA news agency has reported.
The king made the order because of fears over Mr Rajab’s health, it said.
An appeals court in May upheld the six-month prison sentence he had received.
He is a member of the island’s Shia majority who has served several prison sentences since setting up the Bahrain Centre for Human Rights in 2002.
Mr Rajab was arrested in April and charged with insulting public institutions on Twitter.
Mr Rajab’s case has often been raised by anti-government protesters who called for his freedom King Hamad has said that he wants to introduce reforms to Bahrain which will protect freedom of speech and other basic rights
Bahrain’s Sunni Muslim rulers forcibly quelled a 2011 uprising which had been triggered in large part by unrest among Shias.
Mr Rajab also fell foul of the authorities in September after suggesting in a tweet that security institutions in Bahrain served as an “ideological incubator” for jihadists.
Human rights groups described his arrest and conviction as developments which should give the US pause for thought as it considered whether to lift restrictions on sending arms to the kingdom.
In June US State Department spokesman John Kirby said that Bahrain’s progress on human rights, including the release of political prisoners, meant that Washington would resume aid to the military in Bahrain.
Shia-dominated demonstrations against Bahrain’s Sunni monarchy have occurred sporadically since 2011.
Dozens died when the government moved to quash the protests.