The first time Dushanbe appeared in the historical record was in 1676, in a letter sent from the Balkh khan Subhonquli Bahodur to Fyodor III, the Tsar of Russia.  However, the Balkh historian Mahmud ibn Wali mentioned the area in the 1630s in the book ''Sea of Secrets Regarding the Values of the Noble''. At first, the town was called "Kasabai Dushanbe", when it was under the control of Balkh. This name reflected both Dushanbe's status as a town, with Kasabai meaning town, and the influence of trade, as the name Dushanbe, which means Monday in Persian, was due to the large bazaar in the village that operated on Mondays. Dushanbe's location between the caravan routes heading east–west from the Gissar Valley through Karategin to the Alay Valley, and north–south to the Kafirnigan River and then to Vaksh Valley and Afghanistan through the Anzob Pass from the Fergana and Zeravshan valleys that ultimately led traders to Bukhara, Samarkand, the Pamirs, and Afghanistan incentivized the development of its market. At the time, the town had a population of around 7,000–8,000 with around 500–600 households.