In the Middle Ages, the brewing right or gruit right was one of the privileges granted by the land owner or territorial ruler. Sometimes this right was linked to a plot or a house, called a "beer court"; sometimes the right was held by a hereditary judge, who might also hold the right to run a pub.