The byfoged was originally the king's representative in the local community, dating back to the 13th century.
[2] In the 16th century, he became the head of the town court (byting [da]) and began to act as a judge.
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.