The Tiananmen Gate was first built in 1417 in the Ming Dynasty. During the demise of the Ming Dynasty, heavy fighting between Li Zicheng and the early Qing emperors damaged (or perhaps destroyed) the gate. The Tian'anmen square was originally designed and built in Beijing in 1651. It was enlarged to its present size (four times its original size) and cemented over in 1958.
British and French troops who invaded Beijing in 1860 pitched camp near the gate and briefly considered burning the gate and the entire Forbidden City down. They decided ultimately to spare the palace and to burn instead the emperor's Old Summer Palace. The Qing emperor eventually agreed to let the foreign powers establish headquarters in the area. During the Boxer Rebellion of 1900 the siege badly damaged the office complexes and several ministries were burnt down. In the conflict's denouement, the area became a space for foreign troops to assemble their armies and horses. It was cleared in due course to produce the beginning of what is now known as the Tiananmen Square.
Near the centre of today's square, close to the site of the Mao Zedong Mausoleum, once stood one of the most important gates of Beijing. This gate was known as the "Great Ming Gate" (大明门) during the Ming Dynasty, "Great Qing Gate" (大清门) during the Qing Dynasty, and "Gate of China" (中华门) during the Republic of China era. Unlike the other gates in Beijing, such as the Tiananmen and the Qianmen, this was a purely ceremonial gateway, with three arches but no ramparts, similar in style to the ceremonial gateways found in the Ming Dynasty Tombs. This gate had a special status as the "Gate of the Nation", as can be seen from its successive names. It normally remained closed, except when the Emperor passed through. Commoner traffic was diverted to two side gates at the northern and eastern ends of today's square, respectively. Because of this diversion in traffic, a busy marketplace, called Chessgrid Streets (棋盘街) developed in the big, fenced square to the south of this gate. In the early 1950s, the Gate of China (as it was then known) was demolished along with the Chessgrid Streets to the south, completing the expansion of Tiananmen Square to (approximately) its current size.