DUBAI (Reuters) - A Bahraini court on Thursday acquitted three senior leaders of the country’s main opposition group of spying for Qatar, a rare win for opposition figures who say they have been targeted by prosecutors for their political views.

In November, the public prosecutor accused Sheikh Ali Salman, opposition al-Wefaq group secretary general, and Sheikh Hassan Sultan, a former member of the Bahraini parliament for al-Wefaq, of conspiring with Qatari officials to carry out “hostile acts” in the kingdom.

The High Criminal Court acquitted them along with a third senior al-Wefaq member, Ali Alaswad, said Public Prosecutor Osama al-Oufi, cited by the state BNA news agency.

Human rights group Bahrain Institute for Rights and Democracy (BIRD) hailed the verdict as “the end of a long, flawed trial”.

“This case should never have been initiated in the first place,” Sayed Ahmed Alwadaei, director of advocacy at BIRD, said in a statement.

In Washington, a U.S. State Department spokeswoman welcomed the verdict and called for Salman’s release.

“Today’s acquittal removes a potential barrier to political reconciliation in Bahrain, and we urge Bahraini prosecutors not to pursue an appeal of the judge’s ruling,” spokeswoman Heather Nauert said at a news briefing.

Bahrain, where a Sunni Muslim royal family rules over a Shi’ite-majority population, has had a febrile political environment in recent years. It was the only one of the Gulf monarchies to experience serious unrest during the “Arab Spring” wave of popular revolts in 2011, and the opposition has since accused the authorities of using harsh tactics in a crackdown.

Since Bahraini authorities crushed street protests in 2011, demonstrators have clashed frequently with security forces, which have been targeted by several bomb attacks.

BIRD said Sultan and Alaswad were tried in absentia. Salman is already serving a four-year prison sentence for inciting hatred and insulting the interior ministry, after he was arrested in 2015.

“The public prosecutor used secret witnesses and a video from a Bahraini television channel which experts described as edited and not complete,” Alaswad told Reuters by phone.

Alaswad is a former member of Bahrain’s parliament for al-Wefaq who resigned in response to the crackdown against the kingdom’s opposition. He has lived in London since 2011.

Bahrain has frequently accused regional Shi’ite power Iran of fomenting unrest. Along with Saudi Arabia, the United Arab Emirates and Egypt, it broke diplomatic and trade ties last year with Qatar, which those countries accuse of harboring terrorists and cosying up to Iran. Doha denies the charges.

Bahrain, a close ally to Saudi Arabia, says Qatar has supported protests and sporadic attacks against security forces, which Doha denies. Both Bahrain and Qatar are close U.S. allies: Bahrain hosts the main U.S. naval base in the Gulf, while Qatar hosts the main U.S. air base.