Taiping troops approach southeastern Shaanxi in the spring of 1862, the local Han Chinese, encouraged by the Qing government, formed Yong Ying militias to defend the region against the attackers. Afraid of the now-armed Han, the Muslims formed their own militia units as a response.