Ming–Turpan conflict

The Ming–Turpan conflict were a series of conflicts between the Ming dynasty and Khanate of Moghulistan (later its division the Turpan Khanate) that erupted due to disputes over borders, trade and internal succession to the throne of Moghulistan (or Turpan).

The Ming dynasty annexed Kara Del (Qumul, Hami) in 1404 and turned it into Hami Prefecture. In 1406 it defeated the ruler of Moghulistan.

In 1443, 1445 and 1448 the Oirats under Esen Taishi occupied Kara Del in Hami. Moghulistan, under Ali (known as Yunus Khan), then seized Hami from Esen in 1473. Ali was driven by the Ming dynasty into Turfan, but he reoccupied it after Ming left. Esen taishi's Mongols recaptured Hami twice in 1482 and 1483.

In 1491 the Ming dynasty installed a descendant of the Yuan dynasty imperial house to the position of Prince of Qumul. They then appointed overseers of each ethnic group residing in Qumul, the position being called tu-tu (In Wade Giles).

The son of Ali, Ahmed (Ahmad Alaq), reconquered it in 1493 and captured the Hami leader Prince Champa and the resident of the Ming in Hami (the Chagatayid Hami was a vassal state to Ming). In response, the Ming dynasty imposed an economic blockade on Turpan and kicked out all the Uyghurs from Gansu. Conditions became so harsh for Turpan that Ahmed left. The Ming army then marched on Qumul. Ahmad Alaq (Hahema) retreated, released Prince Champa, acknowledged his inferior position to the Ming emperor and agreed that Champa would take the throne of Qumul. One of the Ming overseers, Sayyid Husain, was the Muslim overseer in July 1494 and fled to Ming territory when Turpan invaded Qumul, but he plotted with Turpan to be appointed as prince under the rule of Turpan. He was arrested in 1516 and sent to Beijing, but bribed his way into the Zhengde Emperor's inner circle, eventually becoming his homosexual lover, although no evidence supporting this claim exists in Chinese sources.

In the 16th century, the Ming dynasty defeated a series of raids by the Khanate of Turpan under Ahmed's son Mansur and the Oirat Mongols, over disputes on tribute. Fighting broke out in 1517, 1524 and 1528 when the Ming dynasty rejected tribute missions from Turpan. Mansur took over Qumul in 1517. Mansur invaded the Ming dynasty in 1524 with 20,000 men through Suzhou District, but was repulsed by Ming forces, including Mongol troops. The Ming refused to lift the economic blockade and restrictions that had led to the fighting and continued restricting Turpan's tribute and trade with the Ming dynasty. Turfan also annexed Qumul (Hami).