HONG KONG — A Hong Kong court has sentenced democracy activists to prison terms of up to 16 months for their roles in demonstrations that led to a 79-day occupation of major roads in 2014.

The protests five years ago demanded more open elections, and sought to force Hong Kong’s leader to step down. Tens of thousands of people joined sit-ins and peaceful street demonstrations, using umbrellas to shield themselves when the police used tear gas and pepper spray to disperse the crowds. The demonstrations came to be known as the Umbrella Movement.

Two professors, Benny Tai and Chan Kin-man, and a retired pastor, Chu Yiu-ming, who along with six others were convicted this month of public nuisance charges, were sentenced to 16 months in prison. The sentence of Mr. Chu, 75, was suspended for two years because of his age and public service record, meaning that he is unlikely to serve time in prison. Mr. Tai and Mr. Chan were ordered to begin their sentences immediately.

They were founders of Occupy Central With Love and Peace, a group championing nonviolent civil disobedience in pursuit of democratic reforms. Their group had called for a short sit-in of two or three days, but that turned into a much longer occupation of city streets after the police used tear gas and pepper spray on student protesters.