 The first brick church and a castle were built between 1617 and 1826 . The two @-@ floor castle , designed on a rectangular plan in the Gothic @-@ Renaissance style , was the work of Job Bretfus . Extension of the castle was continued by Krzysztof Wiesiołowski , starost of Tykocin , Grand Marshal of Lithuania since 1635 , and husband of Aleksandra Marianna Sobieska . In 1637 he died childless , and as a result Białystok came under the management of his widow . After her death in 1645 the Wiesiołowski estate , including Białystok , passed to the Commonwealth to cover the costs of maintaining Tykocin Castle . In the years 1645 – 1659 Białystok was managed by the governors of Tykocin and was part of the Grand Duchy of Lithuania . 
