In the Yuan dynasty (1271–1368), most of the temples, pagodas and other halls or pavilions were destroyed in the battle of Chaozhou during the Mongolian invasion of the 13th century.