When, in response to the violently anti-foreign Yihetuan ("Boxers"), foreign powers invaded China, the Empress Dowager declared war on them, leading to defeat and the flight of the Imperial Court to Xi'an.