By the 19th century, the city walls had a circumference of around , with an inner and outer city divided by an inner wall and a ridge of hills surmounted by a well-built fort. The inner harbor on Yundang Bay was also well fortified and these defenses were further strengthened upon the outbreak of the First Opium War. Nonetheless, Xiamen was captured in 1841 between Guangzhou and Zhoushan. Rear Adm. Parker bombarded the Qing position to little effect, but the assault by the men under Lt. Gen. Gough caused the Chinese to flee their positions without a fight. The city was abandoned during the night and fell the next day on 27 August. The Chinese had spirited out the entire treasury of sycee bullion under the nose of the British by disguising it inside hollow logs. Xiamen being too large to garrison, a small force was left to hold Gulangyu. The next year, the Treaty of Nanjing made Xiamen one of the first five ports opened to British trade, which had previously been legally restricted to Guangzhou. Subsequent treaties opened the port to other international powers.