Zhengyangmen was first built in 1419 during the Ming dynasty and once consisted of the gatehouse proper and an archery tower, which were connected by side walls and together with side gates, formed a large barbican. The gate guarded the direct entry into the imperial city. The city's first railway station, known as the Qianmen Station, was built just outside the gate. During the Boxer Rebellion of 1900 in the late Qing dynasty, the gate sustained considerable damage when the Eight-Nation Alliance invaded the city. The Hui and Dongxiang Muslim Kansu Braves under Ma Fulu engaged in fierce fighting during the Battle of Beijing at Zhengyangmen against the Eight-Nation Alliance. Ma Fulu and 100 of his fellow Hui and Dongxiang soldiers from his home village died in that battle. Ma Fulu's cousins, Ma Fugui (馬福貴) and Ma Fuquan (馬福全), and his nephews, Ma Yaotu (馬耀圖) and Ma Zhaotu (馬兆圖), were killed in action during the battle. The Qing Empire later violated the Boxer Protocol by having a tower constructed at the gate.<ref>"In the hunting-park, three miles to the south of Peking, is quartered the Sixth Division, which supplies the Guards for the Imperial Palace, consisting of a battalion of infantry and a squadron of cavalry. With this Division Yuan Shi Kai retains twenty-six modified Krupp guns, which are the best of his artillery arm, and excel any guns possessed by the foreign legations in Peking.