hardcore extremist muslim school began with the wahab guy in 1850s. chinese scholars met him on their pilgrimage and brought back that ideology, it led to internal hui civil war supported by qing govt. extremists were defeated and were accused of trying to become non chinese.
this led to hui ideology in china shifting to nationalism core. this in turn led the hui battalion to support the boxer rebellion. most of the boxer rebels actually fighting were gansu hui battalion, the farmers ran home. this let the hui fight christians and prove their loyalty to china.
about 20 thousand hardcore kung fu masters stayed behind, 200 thousand farmers ran home the night before. because boxers were technically infidels the hui army used them as human shields. this was the source of the "savage horde" reports