The rebels quickly proclaimed Nasir al-Din khan. While he would reign, however, the true power in Kokand lay in the hands of Pulat Bey, a relative of Nasir, and Abd al-Rahman Avtobachi, an Uzbek noble. Under their influence, the rebellion spilled over into Turkestan in August, 1875. A gazavat, or holy war, was proclaimed by Kokand's new leaders and messengers and agents were sent into the villages and towns around Khojend and Kuraminsk to raise those populations in revolt against the Russians. On August 9, 1875 a large force of Kokandians surrounded Khojend and laid siege to the city. The Russian garrison was forced to take refuge in the city's citadel and communications with Tashkent were cut.
The invasion of Russian territory finally propelled Kaufmanns into action. Three days after the Khojend garrison was besieged, he led his troops - some 3,000 men in 16 infantry companies, 9 sootiness of Cossacks, and several batteries - out of Tashkent. Nine days after Khojend had been surrounded, the relief column entered the city, the besiegers having retreated into Kokandian territory.
Without pausing, Kaufmanns marched into Kokand. The rebel host, estimated at 30,000 to 50,000 and led by Abd al-Rahman Avtobachi, fell back to the fortress of Makhram. The Russians followed and on August 22, 1875 assaulted the rebel position. About 90 Kokandians were killed before their army broke and fled up the Syr Darya. Colonel Skobelev, who had transferred from the Caucasus command to Kaufman's command, led the pursuit. His Cossacks gave no quarter, killing 1,000 or more Kokandians during a six mile chase. Kaufman's losses in the battle and on the pursuit amounted to six dead and eight wounded. On the 23rd, Kaufman pushed on and peacefully occupied Kokand city three days later.
Meanwhile Abd al-Rahman and his surviving troops had fled to Margelan. This proved to be no haven as the Russians reached that city on September 8. The rebels, now numbering only 8,000, fled again. Kaufman sent Skobelev and his Cossacks in pursuit. They scattered all opposition until they reached Osh. This town fell without a shot and Skobelev, believing that further pursuit would be useless, returned to Margelan.
One by one most of Kokandian towns and villages, including the city of Andizhan, submitted to the Russians. Finally, Nasir al-Din surrendered and signed a peace treaty on September 23, 1875. The Russians were to be paid 3 million rubles over the next six years and were to be ceded all Kokandian territory along the right bank of the Syr Darya, including the town of Namangan. In addition, Nasir acknowledged the Tsar as his feudal superior. Having annexed this territory on his own authority, Kaufman was unsure of his military and political future until he finally received the Tsar's authorization to seize these lands.