Karshi developed steadily from the 14th century. During the Sheyban dynasty the town grew violently (16th century). It was the second largest town of Bukhara Khanate in the 18th century. During these centuries much of the city's magnificent architectural monuments were built.[https://samarkandtours.com/uzbekistan/karshi/] With the decline of Shahrisabz in the 18th century, Qarshi grew in importance, and was the seat of the Crown Prince to the Emirate of Bukhara. The city had a double set of walls, 10 caravanserais and 4 madrassahs during this time. By 1868, the Russians had annexed the Zarafshan Valley, and in 1873, the treaty turning Bukhara into a Russian protectorate was signed in Qarshi, much to the dismay of the Emir's son, Abdul Malik, who took to the hills in rebellion.