reinforced by the dungan people of hezhou, zuo zongtang planned to advance westward along the hexi corridor toward xinjiang. however, he felt it necessary to first secure his left flank by taking xining, which not only had a large muslim community of its own, but also sheltered many of the refugees from shaanxi. xining fell after a three-month siege in late 1872. its commander ma guiyuan was captured, and defenders were killed in the thousands. the muslim population of xining was spared but the shaanxi refugees sheltering there were resettled to arable land in eastern and southern gansu, which were isolated from other muslim areas.