By the 15th century, Beijing had essentially taken its current shape. The Ming city wall continued to serve until modern times, when it was pulled down and the 2nd Ring Road was built in its place.[54] It is generally believed that Beijing was the largest city in the world for most of the 15th, 16th, 17th, and 18th centuries.[55] The first known church was constructed by Catholics in 1652 at the former site of Matteo Ricci's chapel; the modern Nantang Cathedral was later built upon the same site.[56]
The capture of Beijing by Li Zicheng's peasant army in 1644 ended the dynasty, but he and his Shun court abandoned the city without a fight when the Manchu army of Prince Dorgon arrived 40 days later.