It was then a part of the Grand Duchy of Lithuania. In 1661 it was given to Stefan Czarniecki as a reward for his service in the victory over the Swedes. Four years later, as a dowry of his daughter Aleksandra who married Jan Klemens Branicki, thus passing into the hands of the Branicki family. In 1692 Stefan Mikołaj Branicki, the son of Jan Klemens Branicki, obtained the rights to the city of Białystok from King John III Sobieski and built Branicki Palace in the city on the foundations of former defensive castle of Wiesiołowskis' family. The project's author is a prominent architect: Tylman of Gameren. In the second half of the 18th century the ownership of the city was inherited by Field Crown Hetman Jan Klemens Branicki. It was he who transformed the previously existing palace built by his father into the magnificent residence of a great noble, which was frequently visited by Polish kings and poets. Numerous artists and scientists came to Białystok to take advantage of Branicki's patronage. In 1745 Branicki established Poland's first military college, School of Civil and Military Engineering and in 1748, one of the oldest theaters in Poland, the "Komedialnia". New schools were established, including a ballet school in connection with the foundation of the theater. On 19 November 1748 marries Izabella Poniatowska as his third wife Hetman Jan Klemens Branicki. Białystok received its city charter on 1 February 1749 from King Augustus III of Poland. During the period of Russian control the city was the capital of the Belostok Oblast, from 1807–1842. After the Peace of Tilsit were signed in 1807 the city passed to Russia. During the period of Russian control the city was the capital of the Belostok Oblast, from 1807–1842, afterward it was a provincial capital within the Grodno Governorate. During the 19th century the city became a major center of textile industry. Due to an industrial boom the population grew from 13,787 in 1857, and 56,629 in 1889, to 65,781 in 1901. At the end of the 19th century, as a result of the influx due to Russian discriminatory regulations, the majority of the city's population was Jewish.