The Arab Umayyad Caliphate in 715 AD deposed Ikhshid, the king the Fergana Valley, and installed a new king Alutar on the throne. The deposed king fled to Kucha (seat of Anxi Protectorate), and sought Chinese intervention. The Chinese sent 10,000 troops under Zhang Xiaosong to Fergana.