evidence: Fergana Valley is a valley in Central Asia, lying mostly in eastern Uzbekistan, extending into southern Kyrgyzstan and northern Tajikistan. [...] The Fergana valley was ruled by a series of Muslim states in the medieval period. For much of this period local and southwestern rulers divided the valley into a series of small states. From the 16th century, the Shaybanid dynasty of the Khanate of Bukhara ruled Fergana, replaced by the Janid dynasty of Bukhara in 1599. In 1709 Shaybanid emir Shahrukh of the Minglar Uzbeks declared independence from the Khanate of Bukhara, establishing a state in the eastern part of the Fergana Valley. He built a citadel to be his capital in the small town of Kokand. As the Khanate of Kokand, Kokand was capital of a territory stretching over modern eastern Uzbekistan and Tajikistan, southern Kazakhstan and all of Kyrgyzstan.