DUBAI, United Arab Emirates — A Shiite cleric who was a central figure in Bahrain’s 2011 Arab Spring protests was sentenced on Sunday, along with two other senior opposition figures, to life in prison, overturning previous acquittals on charges of spying for Qatar.

Amnesty International called the sentence a “travesty of justice.”

The public prosecutor said the court had sentenced the cleric, Sheikh Ali Salman, secretary general of the opposition al-Wefaq group; and Sheikh Hassan Sultan and Ali Alaswad, members of the same group, for transferring confidential information to and receiving financial support from Qatar, according to Reuters.

The prosecutor had appealed a court ruling that acquitted the three last June in a rare victory for opposition figures who say they have been targeted for their political views.

Mr. Salman is already serving a four-year prison sentence on charges of inciting hatred, after he was arrested in 2015. Mr. Sultan and Mr. Alaswad were tried in absentia.