In order to repel future Polish–Lithuanian attacks, Boris Godunov made it his priority to heavily fortify the city. The stone kremlin constructed in 1597–1602 is the largest in Russia. It features thick walls and numerous watchtowers. Heavy fortifications did not prevent the fortress from being taken by the Polish–Lithuanian Commonwealth in 1611 after a long twenty-month siege, during the Time of Troubles and Dimitriads. Weakened Muscovy temporarily ceded Smolensk land to the Polish–Lithuanian Commonwealth in the Truce of Deulino. The city was granted Magdeburg rights in 1611 and became the seat of it was the seat of Smolensk Voivodeship for the next forty-three years.