Bahraini rights activist Nabeel Rajab, who played a key role in 2011 anti-government protests, was freed from jail Tuesday after serving time over tweets critical of the Saudi-led military campaign in Yemen.

"Nabeel has been released and he is on his way home now," his lawyer Mohammed Al-Jishi told AFP, adding that Rajab would serve the remaining three years of a five-year sentence in an "alternative" or non-custodial setting.

Rajab, a leading figure in the Shiite-led protests against the Gulf state's Sunni-minority monarchy, had been convicted of insulting the state, spreading false news, and "publicly offending a foreign country", a reference to Saudi Arabia.

The court convicted him of endangering Bahrain's military operations in Yemen. Manama is part of the Saudi-led coalition that has been fighting the Iran-aligned Huthi rebels in Yemen since 2015.

He also tweeted criticism of the Bahraini government's treatment of prisoners.

Rajab had spent four years in jail after earlier being convicted over media interviews deemed critical of the government.

The United Nations had led calls for his release, condemning his detention as "arbitrary" and "discriminatory".

"Nabeel is a dedicated and passionate activist who has always advocated for human rights in Bahrain," Aya Majzoub, a researcher at Human Rights Watch, told AFP.

"He should have not have been imprisoned in the first place, but we are glad that he is finally reunited with his family."

US Senator Chris Murphy, who visited Rajab's family home when he travelled to Bahrain to attend a security conference last year, welcomed the release as proof of the power of international pressure.

"Nabeel Rajab has been released from prison. Will serve out the rest of his sentence at home. This is good news and a sign of what can happen when the United States makes trouble over political prisoners," he tweeted.

Bahraini human rights activist Nabeel Rajab, seen here in 2014, has served time for "insulting the state", spreading false news, and "publicly offending a foreign country" -- Bahrain's neighbour Saudi Arabia
Bahraini human rights activist Nabeel Rajab, seen here in 2014, has served time for "insulting the state", spreading false news, and "publicly offending a foreign country" -- Bahrain's neighbour Saudi Arabia AFP / MOHAMMED AL-SHAIKH

Bahrain's population is mostly Shiite Muslim according to unofficial estimates contested by the government.

The country -- which is home to the US Navy's Fifth Fleet and a British military base -- is located between regional rivals Saudi Arabia and Iran and has been ruled for more than two centuries by the Sunni Al-Khalifa dynasty.

Authorities have jailed dozens of high-profile activists and disbanded both religious and secular opposition groups since Shiite-led protests inspired by the "Arab Spring" erupted on the streets of Manama in 2011.

Hundreds of opponents have since been stripped of their citizenship, leaving many stateless.

Bahrain accuses Iran of instigating the protests and of training "terrorists" who allegedly carried out attacks on security forces, charges that Tehran has denied.

Bahrain activists said the lives of all opposition figures in crowded prisons were threatened by the coronavirus pandemic, with more than 15,000 cases recorded in the island nation.

Rajab's family said they had been "graced by God" with his return home, but that he had an extremely weak immune system "which puts him at risk of contracting the virus which is a threat to his life."

"We apologise for not receiving well-wishers," they said in a statement.