 In 1661 it was given to Stefan Czarniecki as a reward for his service in the victory over the Swedes during the Deluge . Four years later , it was given as a dowry of his daughter Aleksandra , who married Hetman Jan Klemens Branicki , thus passing into the hands of the Branicki family . In 1692 , Stefan Mikołaj Branicki , the son of Jan Klemens Branicki ( Marshal of the Crown Court ) , obtained city rights for Białystok from King John III Sobieski . He constructed the Branicki Palace on the foundations of the castle of the Wiesiołowski family . In the second half of the eighteenth century the ownership of the city was inherited by Field Crown Hetman Jan Klemens Branicki . It was he who transformed the palace built by his father into a magnificent residence of a great noble . 
