The late 19th century saw China grappling with internal challenges and foreign encroachment. The Qing Dynasty faced corruption, economic stagnation, and military defeats by Western powers, leading to unequal treaties and loss of territory. This period sparked debates on modernization and adopting Western ideas. The Hundred Days' Reform of 1898 aimed to modernize China's systems but failed due to conservative opposition. This failure contributed to growing anti-foreign sentiment, culminating in the Boxer Rebellion of 1899-1901. These events weakened the Qing Dynasty and shaped China's path towards nationalism and modernization.