The byfoged was originally the king's representative in the local community, dating back to the 13th century.[1] In Norway, the title dates back to 1337, in Bergen.[2]
In the 16th century, he became the head of the town court (byting [da]) and began to act as a judge. In the 17th century, he began to be appointed by the king;[3] at the same time, in market towns, the magistrate and the byfoged were jointly responsible for administration and the administration of justice. The office was usually held by a respected member of the merchant class, and he was often a member of the magistrate, both before and after his time as foged. Gradually, most of the town's administrative functions were brought together in the office, and during the 18th century he became the first professional civil servant in the local community.
His functions were many and varied: He was a judge in both the city court and the fogedret [da] (bailiff's court), he was an auctioneer, in charge of estate administration and land registration, and from 1701 he acted as chief of police and in many cases also as both magistrate and town council chairman.
In 1736 a decree was issued requiring judges to undergo a legal examination, but this was slow to take hold, as the king often chose on the recommendation of the diocesan magistrate (stiftamtmanden), who often took local considerations into account. The diocesan magistrate also supervised the lower courts.
Before 1919, the herredsfoged (hundred bailiff) was both police chief and judge. If there was a market town in the judicial district, the herredsfoged was also the mayor of the town (from 1868 to 1919), elected by the king. During this period, the herredsfoged thus performed the functions previously performed by the byfoged.