DUBAI, United Arab Emirates — Bahrain freed a prominent human rights activist Tuesday amid the ongoing coronavirus pandemic, allowing him to serve out the remainder of his internationally criticized prison sentence from home.

Nabeel Rajab, 55, wore a garland of white roses after his release, smiling while posing with his family for the first time since being detained in June 2016.

Rajab will serve out the reminder of his prison term at home, his family said.

Bahrain has been releasing inmates amid the pandemic, but largely had avoided freeing political prisoners. In September, a court denied Rajab's request to serve out the rest of his sentence at home.

Asked about Rajab's release, Bahrain's Embassy in London acknowledged the activist had been granted a noncustodial sentence without elaborating on his case.

Rajab was a major figure in Bahrain's 2011 protests that saw tens of thousands from the country's majority Shiite population and others demand greater rights from the Sunni-led monarchy. He is also the co-founder and president of the Bahrain Center for Human Rights and a founding director of the Gulf Center for Human Rights.

Rajab received a five-year prison sentence over tweets alleging torture at one of the country's prisons and criticism of the Saudi-led war in Yemen. He separately received a two-year prison sentence over television interviews he gave that included criticism of Bahrain, a small island nation off Saudi Arabia that's home to the U.S. Navy's 5th Fleet.

It was unclear how much time Rajab has left to serve.

Bahrain's constitution guarantees its citizens freedom of speech. However, Rajab was prosecuted under laws making it illegal to offend a foreign country, spread rumors at wartime or "insult" a government agency. That drew international criticism from activists, as well as the United Nations' Working Group on Arbitrary Detention.

"Mr. Rajab's political views and convictions are clearly at the center of the present case and that the authorities have displayed an attitude towards him that can only be characterized as discriminatory," the panel said in 2018. "He has been the target of persecution, including deprivation of liberty, for many years and there is no other explanation for this except that he is exercising his right to express such views and convictions."

Troops from Saudi Arabia and the United Arab Emirates helped Bahrain violently suppress the 2011 protests. In the years since, Bahrain has dismantled opposition groups, imprisoned activists and revoked the citizenship of over 700 people. Amid the crackdown, local Shiite militant groups have carried out small attacks on security forces.

The U.S. under President Barack Obama had held up approving a multibillion-dollar sale of F-16 fighter jets over human rights concerns in Bahrain. The Trump administration later approved the sale without those concerns being addressed.

The State Department did not respond to a request for comment. However, U.S. Sen. Chris Murphy, who visited Rajab's family while on a trip to Bahrain in November, applauded his release.

"This is good news and a sign of what can happen when the United States makes trouble over political prisoners," Murphy, a Democrat from Connecticut, wrote on Twitter.

It wasn't Rajab's first time to be targeted by authorities. He was sentenced in August 2012 to three years in prison for allegedly fomenting clashes between police and protesters, a case similarly criticized by the U.N. panel. At the time, he was already serving a three-month sentence for posting anti-government comments on Twitter. He was released in May 2014 after serving two years, but was detained again over his comments on Twitter.

Bahrain's King Hamad bin Isa Al Khalifa pardoned Rajab in July 2015 over concerns about his health after the activist served some three months in prison.

Bahrain, home to 1.5 million people, has reported over 15,000 cases of the coronavirus and the COVID-19 illness it causes, with 10,000 recoveries and 29 deaths. Activists urged the kingdom to release other political prisoners who suffer from pre-existing illnesses.

"Bahrain's prisons remain crowded with peaceful human rights defenders and opposition leaders, whose lives are threatened by the government's inadequate response to COVID-19," said Husain Abdulla, the executive director of the group Americans for Democracy and Human Rights in Bahrain.