Biecz was a royal city, and the center of local administrative, judicial, and military authority from the 12th century until 1783. In the 17th century, the district of Biecz encompassed eleven cities and 264 villages, as well as three castles, the royal court, and several royal residences. Kings from both the Piast and Jagiellon dynasties made use of these royal residences. The royal residences remained in use by Polish monarchs until John II Casimir Vasa, who passed through the city while on his campaign to drive the Swedes from Poland.