STRASBOURG, France (CN) – The European Court of Human Rights ruled Thursday that Jehovah’s Witnesses in Azerbaijan cannot be forced to serve in the military.

“Freedom of thought, conscience and religion [is] one of the cornerstones of a ‘democratic society’ within the meaning of the” European Convention on Human Rights, the court said in a press release announcing the decision. The ruling from the seven-judge panel is only available in French.

The five men who brought the case are all Azerbaijani nationals who were called up for military service when they came of age. All of the men are also Jehovah’s Witnesses.

The Christian denomination is opposed to war in all forms and members generally do not join any military forces. There are about 1,500 members in the South Caucasus country, which has a population of nearly 10 million.

The five men were all prosecuted for evading military service. All were sentenced to time in prison and their appeals in Azerbaijani courts were denied.

The Strasbourg-based Court of Human Rights was created by the 1953 European Convention on Human Rights and hears cases on political freedom and human rights. Applicants must first exhaust legal options in their own countries before bringing cases before the court.

Azerbaijan has mandatory military service and all men are required to serve for 18 months when they turn 18. All five men, who range in age from 25 to 36, offered instead to serve in a civilian force.

However, Azerbaijan doesn’t offer a civilian alternative even though the country was told it must create such a force within two years when it joined the Council of Europe in 2001. Other countries with mandatory service, such as Israel and Finland, allow objectors to work in hospitals or schools instead.

The Court of Human Rights said Thursday that the five men’s convictions “had stemmed from the fact that there was no alternative service system under which individuals could benefit from conscientious objector status,” in violation of the Convention.

The ruling cited the court’s decision in another case, Savda v. Turkey, which held that a system without a civilian alternative to military service cannot “be said to have struck a fair balance between the interest of society as a whole and that of the conscientious objectors.”

Azerbaijan does allow for students in religious studies to be exempted from service, but the court ruled that wasn’t sufficient.

The five men in the case – Mushfig Faig oglu Mammadov, Samir Asif oglu Huseynov, Farid Hasan oglu Mammadov, Fakhraddin Jeyhun oglu Mirzayev and Kamran Ziyafaddin oglu Mirzayev – were awarded a total of about 37,000 euros, or $41,000.