One of Afaqis' kin was able to escape to Khanate of Kokand on the demolition of Khanate of Yarkand. The descendants of Afaqis and their supporters raised Jihad frequently on recovery of lost territory from 1826 to 1857. It is said there was a support from Khanate of Kokand for the Jihads.
In Qing inland, rebellions of Muslim occurred in high frequency. Rebellion in Yunnan Province in 1855 is one of the famous rebellions. The great rebellion in Shaanxi and Gansu from 1862 stimulated the Muslim in East Turkistan immensely. There were conflicts between Muslims and Han even before these rebellions but during this time the conflicts became the actual action 'xi Hui (washing off the Muslims)', the multicide of Muslims and it happened frequently.
Firstly 'Dungan' (Han Muslim) pushed the Ishaqis Khoja to make uprising and then, following this, Muslim regimes were established in every city. The Qing might was cleared away from East Turkistan.
In 1865, Yakub Beg, the general of Khanate of Kokand held the Khoja of Afaqis to make uprising and attacked Kashgar. Yakub Beg, affiliated with Dungan, dominating almost the entire area except Ili by 1872, set Aksu as capital city, declared himself Khan and established Khanate of Kashgar. (Ili was under control of Russia that took advantages on this bewilderment).
This is how East Turkistan again gained Islamic regime by Turks. Externally it had commercial treaty with Russia and UK, and set Ottoman Empire as imperial country. East Turkistan was widely recognised its existence.
However, this nation was perished by the ingression of Zuo Zongtang, the general of Qing and again, East Turkistan was under control of China. After the retorocession of Ili from Russia, it became Xinjian Province in 1884, and it was to be governed by Qing directly. Prefectures and city governments were set following the inland way and administration exactly same as China was held.
In addition, from around 1840, Central Asia acted as a place for tag of war of Russian and UK. By the search done by explorers from European countries including above two and Japan, various geographical and historical discoveries of Central Asia were made.
Japanese expedition party, Otani Expedition Party, was led by Nishi Honganji to trace the Buddhist propagation but this make Russia and UK skeptical that it was actually a spy for the military objective.

The thirty years from being Xinjiang Province to the annihilation of Qing Dynasty maintained comparatively lull status. In 1911, Republic of China was established by Xinhai Revolution. Outer Mongolia became independent on the occasion and became a satellite state of Soviet Union. Tibet went through twists and turns and became an independent country virtually.
Even in this bewildered time, East Turkistan did not have any significant commotion. It is said that this is because of the tact of astute diplomacy and governance that Yang Zengxin, the President of Xinjiang at that time.
However, after the assassination of Yang Zengxin in 1928, the misgovernment and suppression of the successor Jin Shuren made East Turkistan blazed up.