 Ma Qi led loyalist Muslim troops to crush Muslim rebels during the Dungan Revolt (1895).During the Boxer Rebellion Ma Qi served with his father Ma Haiyan in Gen. Dong Fuxiang's Kansu Braves against the invading Eight Nation Alliance in Beijing.Ma Haiyan defeated the foreign army at the Battle of Langfang in 1900, and died while protecting the Imperial Family from the western forces.