In 1776, the ruling Habsburg dynasty sold the city to the Siemieńscy family, effectively revoking Biecz's status as a royal city. Initially the new administration provided a certain stability. However, in 1783, the city was forced to defend itself against invaders, forcing the administrative and judicial branches of government to shut down. The last Biecz castle still in service as a military stronghold fell to the invaders, who laid siege to the city. Effectively cut off from communication with the rest of the Austrian partition, and severed from the traditional Hungarian trade routes, the city withstood the invasion solely due to the recent renovation and strengthening of the city walls.