after successfully repulsing zuo zongtang's initial assault in 1872 and inflicting heavy losses on zuo's army, ma zhan'ao offered to surrender his stronghold to the qing, and provide assistance to the dynasty for the duration of the war. he managed to preserve his dungan community with his diplomatic skill. while zuo zongtang pacified other areas by exiling the local muslims (with the policy of "washing off the muslims" () approach that had been long advocated by some officials), in hezhou, the non-muslim han were the ones zuo chose to relocate as a reward for ma zhan'ao and his muslim troops helping the qing crush muslim rebels. hezhou (linxia) remains heavily muslim to this day, achieving the status of linxia hui autonomous prefecture under the prc. other dungan generals including ma qianling and ma haiyan also defected to the qing side along with ma zhan'ao. ma's son ma anliang also defected, and their dungan forces assisted zuo zongtang's qing forces in crushing the rebel dungans. dong fuxiang also defected to the qing. he was in no sense a fanatical muslim or even interested in revolt, he merely gained support during the chaos and fought, just as many others did. he joined the qing army of zuo zongtang in exchange for a mandarinate. he acquired estates which were large.