BEIJING—A Beijing court sentenced one of China's most prominent rule-of-law advocates to four years in prison on Sunday, bringing to a close the most closely watched trial of a Chinese dissident in years.

Xu Zhiyong, 40 years old, was found guilty of disturbing public order, according to a short statement posted to the official microblog feed of the Beijing First Intermediate People's Court.

The...