Bahrain's opposition leader, Sheikh Ali Salman, has been handed a life sentence after the Court of Appeal found him guilty of spying for Qatar.
The ruling comes just months after the Bahraini High Court of First Tier acquitted Salman of the charge of "colluding" with the rival state.
Bahrain cut ties with Qatar in 2017.
Human rights group Amnesty has described the decision as a "travesty of justice" amid Bahrain's "continued crackdown on dissent".
"This verdict... demonstrates the Bahraini authorities' relentless and unlawful efforts to silence any form of dissent," Amnesty's Middle East and North Africa director Heba Morayef said.
"Sheikh Ali Salman is a prisoner of conscience who is being held solely for peacefully exercising his right to freedom of expression."
Ali Salman, who led the now outlawed Al-Wefaq movement, was accused of plotting with Qatar to stoke anti-government unrest in 2011, along with fellow opposition leaders Hassan Sultan and Ali al-Aswad.
They have also received life sentences.
Bahrain's public prosecutor said the three men were jailed for "acts of hostility" against Bahrain and "communicating with Qatari officials... to overthrow constitutional order", according to news agency AFP.
But the accusations, which date back seven years, only came to light last year - after Bahrain, Saudi Arabia, the UAE and Egypt cut links with Qatar.
The allies accused the emirate of supporting terrorist groups and of being too close to Iran - allegations the emirate has vigorously denied.
At the time, Wefaq said the allegations were an attempt by the Bahraini government to smear it and prolong the imprisonment of its leader, who has been in custody since 2015.
What happened in 2011?
Demonstrators - mainly led by the majority Shia community - took to the streets in February 2011, demanding more democracy as part of pro-democracy uprisings across the Arab world.
But the royal Al Khalifa family, who hold most of the political and military posts, managed to suppress the protests with the help of neighbouring countries, most importantly Saudi Arabia.
The unrest left at least 30 civilians and five policemen dead.
Ever since, the Sunni-ruled Bahrain has been wracked by unrest. In response, Bahrain - a key ally of the United States and the UK, which both have naval bases in the country - has outlawed opposition groups, while hundreds of government critics have been jailed.
By Yolande Knell, BBC News
Most people in the tiny Gulf country are Shia Muslims but it is ruled by a Sunni Muslim royal family that controls top government posts.
As leader of the main Shiite opposition party, Sheikh Ali Salman was among those calling for democratic reforms including a constitutional monarchy and elected prime minister.
Al-Wefaq had the biggest bloc in parliament before the 2011 protests but its members resigned when those were suppressed. Later the party was banned - along with other religious and secular opposition groups.
Dozens of clerics and activists have been jailed. Before this verdict, Sheikh Ali Salman was already imprisoned on charges of inciting hatred.
Human rights groups accuse the international community of failing to speak out about abuses in Bahrain because of its strategically important location and value as a defence and security hub.