Ligdan Khan
In 1557, the Tümed Mongol leader Altan Khan began building the Da Zhao Temple on the Tümed plain in order to convince the Ming dynasty (1368–1644) government of his leadership of the southern Mongol tribes. The town that grew up around this temple was called the "Blue Town" ("Kokegota" in Mongolian). The Ming had been blockading the Mongols' access to Chinese iron, cotton, and crop seeds, in order to dissuade them from attacking the North China plain. In 1570, Altan Khan successfully negotiated the end of the blockade by establishing a vassal-tributary relationship with the Ming, who changed Kokegota's name to Guihua (; postal: Kweihua; ) in 1575. The population of Guihua grew to over 150,000 in the early 1630s as local Mongol princes encouraged the settlement of Han Chinese merchants. There were occasional attacks on Guihua by Mongol armies, such as the total razing of the city by Ligdan Khan in 1631. Altan Khan and his successors constructed temples and fortresses in 1579, 1602 and 1727. The Tümed Mongols of the area had long since adopted a semiagricultural way of life. Hui merchants gathered north of the gate of the city's fortress, building a mosque in 1693. Their descendants formed the nucleus of the modern Huimin district.