Three primary demographic factors combined in the 1860s to create the Gelaohui as a major sociopolitical force: (1) members from the Guolu, which had been a marginalized group in the 1840s, (2) members from the Hunan forces fighting the Taiping rebellion, and (3) members from the 1859-1865 major peasant uprising against the Qing empire led by
Li Longhe and Lan Dashun. A Chinese official expressed the animosity towards foreigners succinctly, "Take away your missionaries and your opium and you will be welcome." During and after the
Xinhai Revolution of 1911, the Gelaohui participated in the massacre of Manchus in the
Xi'an banner garrison in the northeast of the city and attacked the Manchu banner garrison in
Ningxia. The
Hui Muslims of Xi'an in Shaanxi sided with the Gelaohui in massacring and raping Manchus while the Hui Muslims of
Gansu under general
Ma Anliang and
Ma Qi supported the status quo so Ma Anliang led an army of Hui to fight against the Hui and
Han rebels in Shaanxi and Ma Qi helped relive the Ningxia garrison, but Ma Anliang and Ma Qi stood down and when
Yuan Shikai forced the Qing dynasty to abdicate and swore allegiance to Yuan Shikai's government, supporting the new
Republic of China. Ma Anliang, Changgeng and Shengyun failed to capture Shaanxi from the revolutionaries. In Ningxia, Qing forces were attacked by both Hui Muslim Gelaohui and Han Gelaohui members, while Hui general Ma Qi and
Ma Yuanzhang were in the Qing forces fighting against them but Ma Yuanzhang defected to the republicans after Ma Anliang gave up on the Qing. Some Gansu Hui led by
Ma Fuxiang joined the republicans. Gansu Hui general Ma Fuxiang did not participate with Ma Anliang in the battles with Shaanxi revolutionaries and refused to join the Qing Manchu Shengyun and Changgeng in their attempts to defend the Qing before the Qing abdication, instead the independence of Gansu from Qing control was jointly declared by non-Muslim gentry with Hui Muslim Ma Fuxiang. The Gelaohui called for Hui and Han of Xi'an to unite and kill Manchus. Among the "tenets" of the Gelaohui was "hatred of the foreigner", from which "hatred of the Manchu" was derived, and it encouraged the killing of foreigners. The Gelaohui hated foreigners and
Christians. During the
Xinhai Revolution in 1912, they attacked Catholic missions in Sandaohe, Ningxia, but the Chinese Muslim forces under Muslim General
Ma Fuxiang protected the missions. The Muslim General Ma Lu () was a member of the Gelaohui. He fought against the Japanese in World War II along with Muslim General
Ma Biao. The Muslim General Ma Yuanlin () was a member of the Gelaohui. The
Hunan Army was extensively infiltrated by the anti Qing Gelaohui secret society, who started several mutinies during the
Dungan Revolt (1862–1877), delaying crucial offensives.
Zuo Zongtang put down the mutinies and executed those involved. Hubei Gelaohui soldiers mutinied in Suide in Zuo Zongtang's army in 1867. The Han Gelaohui had infiltrated the Qing military in Xinjiang during the
Dungan revolt (1895–1896) and allegedly planned to help the Hui rebels before the Hui rebels were crushed. Despite being staunchly against the production and sale of opium by foreign powers during the later Qing dynasty, members of the Gelaohui became involved in domestic opium harvesting. A successor to Gelaohui in Sichuan, named the Gown Brotherhood () permeated all forms of local government in
Songpan County until the
Second Sino-Japanese War. Despite campaigns stemming from
Chengdu to decrease opium production and consumption, mountainous regions in rural Sichuan which relied on trade used opium production to offset increased land taxation from the Nationalist government, of which Gown Brothers acted as security and distribution networks. Xi'an Hui Muslims managed tea shops in
Songpan County, Sichuan. The Gelaohui in Sichuan attacked western Christian missionaries and promoted the growing and trafficking of opium against the Qing government which tried to crack down on opium. The Gelaohui was present in the Sichuan Hubei border and the Fuguhui group which promoted traditional Han hairstyle and clothes against modern western influence was present there as well. Many Hui smoked opium in Yunnan in addition to dealing in it, despise denials by some Hui that they did not smoke it since it was against Islam. Opium is still produced in ethnic minority regions of Yunnan and other regions. A year before the massacre of Manchus in October 1911, an oath against Manchus was sworn at the
Great Goose Pagoda in Xi'an by the Gelaohui in 1911. Manchu banner garrisons were slaughtered in Nanjing, Zhenjiang, Taiyuan, Xi'an and Wuchang The Manchu quarter was located in the north eastern part of Xi'an and walled off while the Hui Muslim quarter was located in the northwestern part of Xi'an but did not have walls separating it from the Han parts. Southern Xi'an was entirely Han. Xi'an had the biggest Manchu banner garrison quarter by area before its destruction. The revolutionaries were led by students of the military academy who overcame the guards at the gates of Xi'an and shut them, secured the arsenal and slaughtering all Manchus at their temple and then storming and slaughtering the Manchus in the Manchu banner quarter of the city. The Manchu quarter was set on fire and many Manchus were burned alive. Manchu men, women and girls were slaughtered for three days and then after that, only Manchu women and girls were spared while Manchu men and boys continued to be slaughtered. Many Manchus committed suicide by overdosing on opium and throwing themselves into wells. The revolutionaries were helped by the fact that Manchus stored gunpowder in their houses so they exploded when set on fire, killing the Manchus inside. 10,000 to 20,000 Manchus were slaughtered. The revolutionaries wore white badges to distinguish themselves when distributing guns at the captured arsenal. The Han Chinese revolutionaries suffered very few injuries or casualties while the Manchus were slaughtered since the Manchus were armed with inferior weapons while the revolutionaries had modern rifles from the arsenal. There were 5,000 Manchu adult men of fighting ability and they could do little as they were slaughtered. The revolutionaries killed all Manchu men, women and children untl Wednesday and after they continued killing all Manchu men while sparing only Manchu females. The Gelaohui revolutionaries were known for being anti-foreign and anti-Manchu and Protestant missionaries said they distributed tracts against foreign missionaries and attacked some Protestant missions during the 1911 revolution with some missionaries getting killed but were reigned in by their superiors and told to only attack Manchus. The Gelaohui then attacked the 20,000 Manchus in the Manchu quarter of the city and slaughtered the majority of them (15,000), expelling the rest. The Manchu governor Sheng Yun flew into a rage as he escaped to Gansu and ordered Gansu Hui Muslim general Ma Anliang to lead Muslim Hui soldiers from Gansu to destroy and sack Xi'an in retaliation for the massacre of the Manchu quarter, but a messenger carried the message to Sheng Yun that the Qing court capitulated in Beijing with Yuan Shikai's agreement and Sheng Yun fell into a rage and reviled Yuan Shikai. Someone shot a letter attached to an arrows into Ma Anliang's camp notifying him of the Qing abdication, so Ma Anliang stopped the attack before it reached Xi'an and withdrew his soldiers to Xi'an was not sacked. After October 1911, the Shaanxi revolutionaries were in a series of stalemates against the Gansu Qing loyalist army made out of Muslims under Ma Anliang and Manchu governor general Shengyun's command. Both sides suffered heavy casualties but Lichuan (Li-chuan) and Qianzhou (Chien-chou) fell to the Gansu army. The Qing emperor abdicated when Xianyang (Shien-yang) was about to be attacked by the Gansu army. The Manchu governor general Shengyun tried who wanted to keep fighting after the Qing abdication tried to hide the abdication, but Ma Anliang received news of it sent to him by
Zhang Fengyi (Chang Feng-yi) via telegram. Shengyun was sarcastically asked by Ma Anliang, "Now that the emperor has abdicated, for whom shall we fight? Do you intend to succeed the emperor?" Ma Anliang fought in 1895 to relieve Xining with four ying of troops and served in the Gansu army under
Dong Fuxiang. The Qing governor generals Changgeng (Chang-keng) and Shengyun had close relations with the Gansu army officers under Dong Fuxiang. The Qing ordered the Gansu-based Ma Anliang to fight against the revolutionaries in Shaanxi and the revolutionaries attacked Ningxia in Gansu and Ma Anliang recovered it, but that was the last victory for the loyalist side as the Qing abdicated and Shaanxi was not taken by the Gansu forces. Ma Anliang was ordered to attack the revolutionaries in Shaanxi by the
baoyi bondservant Chang Geng and Manchu Shengyun. Eastern soldiers of the new republic were mobilized by Yuan Shikai when the attack against Shaanxi began by Ma Anliang, but news of the abdication of the Qing emperor reached Ma Anliang before he attacked Xi'an, so Ma Anliang ended all military operations and changed his allegiance to the Republic of China. All pro-Qing military activity in the northwest was put to an end by this. Yuan Shikai managed to induce Ma Anliang to not attack Shaanxi after the Gelaohui took over the province and accept the Republic of China under his presidency in 1912. During the National Protection war in 1916 between republicans and Yuan Shikai's monarchy, Ma Anliang readied his soldiers and informed the republicans that he and the Muslims would stick to Yuan Shikai until the end. Yuan Shikai ordered Ma Anliang to block Bai Lang (White Wolf) from going into Sichuan and Gansu by blocking Hanzhong and Fengxiangfu. The Protestant Shensi mission operated a hospital in Xian. Some American missionaries were reported killed in Xi'an. A report claimed Manchus massacred missionaries in the suburbs of Xi'an. Missionaries were reported killed in Xi'an and Taiyuan. Shaanxi joined the revolution on October 24. Sheng Yun was governor of Shaanxi in 1905. == 1930s: years of decline ==