In later years of Qajar rule, "anti-Bábí pogroms and campaigns usually occurred during provincial or national crises such as those caused by harvest failures, famines, and epidemics. The Bábís (and later Baháʼís) served as scapegoats to cover the state's failure in relation to European economic and political intrusion. Drawing the attention of the public to the evils of this 'devious sect' served to consolidate the relationship between the Qajar government and the clergy." The last Qajar king, Ahmad Shah, was sidelined in a military operation supported by the British and led by military officer Reza Khan, who arranged for his subsequent appointment as Iran's minister of war. Following his departure for Europe in 1923, Ahmad Shah was formally deposed by Iran's parliament in 1925, ending the Qajar dynasty.