The first time was the British and French Allied Forces, which invaded Beijing on October 13, 1860, through the Andingmen Gate. At that time, the emperor of the Qing Dynasty was Xianfeng. Reigning Emperor Xianfeng fled to Chengde, leaving his younger brother, Prince Gong Yixin, as regent in Beijing. As a result, the British and French forces occupied Beijing, looted and burned down the Yuanmingyuan. The British and French forces looted and burned the suburbs of Beijing for nearly 50 days, and the royal gardens on the outskirts of the capital, such as the Yuanmingyuan, the Garden of Clear Ripples, the Garden of Quiet Brightness (Yuquanshan), the Garden of Quiet Peace (Fragrant Hills), and the Garden of Smooth Spring, were all burned to the ground.
The second was the Eight-Power Allied Forces invasion of China in 1900. The allied forces overran Beijing, when the Qing emperor was Guangxu. Cixi was in de facto power. After the defeat, Cixi fled with Guangxu to Xi'an, Shaanxi Province. After the war, the Qing Dynasty was forced to pay an indemnity of 450 million taels of silver, to be repaid in 39 years, the principal and interest **** totaled 980 million taels.