The village of Masu was inhabited by Taiwanese aborigines before the era of European colonization. The area first came under the control of the Spanish, who were then ousted by the Dutch. The area began to develop when Hoklo people came to set up fishing operations. The Ming dynasty loyalist Koxinga landed his troops at Wanli in 1661 to expel the Dutch from their northern strongholds while their principal fortress in Tainan was under siege. In 1683, following the Qing dynasty conquest of Taiwan, the area was incorporated into Zhuluo County. In 1875, it was a member of Kimpauli, Kelung Sub-Subprefecture. In 1891, during Qing dynasty rule, the village was destroyed by military force as punishment for engaging in raids against Chinese camphor men and soldiers near Tokoham. When the Japanese took control of the island in 1895, Wanli became part of Kīrun Subprefecture, Taihoku Ken. In 1901, a reorganisation split Taihoku Ken up into smaller prefectures, with Banri becoming part of Kinpori Subprefecture, Kīrun Prefecture. In 1909, Kīrun Prefecture was amalgamated into the larger Taihoku Prefecture. This situation remained in place until the China took over administration of Taiwan at the end of World War II: Taihoku Prefecture became Taipei County, and Banri Village became Wanli Township.
Geography
Wanli is bordered to the northwest by Jinshan District, to the northeast by the Pacific Ocean, to the east by the Anle and Qidu Districts of Keelung. To the south is a short border with Xizhi District of New Taipei City, and to the southwest is Taipei City's Shilin District. The topography of the area is marked by the rocky Pacific coastline and the forested, mountainous interior.
Administration
Since 25 December 2010 Wanli has been administered as the Wanli District of New Taipei City. Prior to this date it had been the Wanli Township of Taipei County. Wanli is further subdivided into ten villages; Wanli, Beiji, Guihou, Yehliu, Dapeng, Huangtan, Shuangxing, Xidi, Kanjiao, and Zhongfu. Prior to the 2010 reorganisation Wanli elected its own mayor, but now as a district of New Taipei City the District Chief is appointed by the mayor of New Taipei City.
Economy
The crabbing industry is important, and in 2012 the government established the Wanli Crabbrand name to boost sales.