SEOUL, South Korea — Fifty-eight young men who had been imprisoned for refusing to serve in South Korea’s military were released from prisons across the country on Friday, after a landmark court ruling that supported the rights of conscientious objectors.

The ruling by South Korea’s Supreme Court on Nov. 1 acquitted a conscientious objector for the first time in the country’s history. The court recognized “conscience or religious beliefs” as a justifiable reason to refuse to serve in the military.

For decades, South Korea has required all able-bodied men in South Korea to serve a minimum of 21 months in the armed forces under a conscription system seen as crucial to the country’s defense against North Korea. The punishment of those who cited their religious beliefs in refusing to serve has been both uniform and harsh.

Guided by the Nov. 1 ruling, lower courts are expected to dismiss cases against 930 men, most of them Jehovah’s Witnesses, who are currently on trial for refusing to do mandatory service in the armed forces if they are determined to be conscientious objectors.