A court in Bahrain on Wednesday convicted 21 prominent activists, most of them leaders of the majority Shiite community, of conspiring to overthrow the government during anti-government protests this year and sentenced them to long jail terms. Eight of the men were sentenced to life in prison by a special military court. Ibrahim Sharif, a secular Sunni Muslim who had joined the Shiites in calling for constitutional reform, was sentenced to five years. The monarchy has accused the men of working with Iran to overthrow the government. Of the 21 sentences, seven were handed down in absentia, mostly to men thought to be in Britain. The defendants pumped their fists in the air and shouted peacefully, as guards dragged them away from the courtroom, Reuters reported from Manama, the capital, citing people who attended the trial. The prosecutors office said in a statement that court ruling was not final and that the accused have a right to appeal within 15 days. The statement said representatives of human rights organizations in Bahrain attended the session, as did representatives of local and foreign media and a number of relatives of the accused.