From the 16th century, Kaunas had guardsmen, consisting of townspeople who protected the town gates and oversaw public order, and from the 17th century also guarded the town walls. The service as guardsmen was the duty of the townspeople, and in exceptional cases the guardsmen were hired. In the 18th century the townspeople guards on the town gates were replaced by military guardsmen of the army stationed in the town, thus additional night guards were ordered by the magistrate only in exceptional cases. The efforts to create a permanent hired night guard remained unfulfilled and most of the duties fell on the Kaunas craftsmen guilds. Changes came during the years of reforms, in 1792 Kaunas townspeople attempted to organise a permanent militia unit consisting of 24 guards. In 1794 the number of night guards had reached 30, and the duty of supporting the guards fell on the townspeople who owned real estate in the town.