Its natural deep sea anchorage and proximity to Taipei made Keelung of vital strategic importance to Taiwan's rulers for nearly two centuries. Today, while a few hilltop military postsremain manned (with at least one topped by a prominent battery of antiaircraft missiles), most former strongholds have been abandoned to weekend hikers, gardeners, fast growing vegetation ... or some combination of all three.
Beyond the half dozen or so batteries designated as historic sites by the city, Keelung has at least as many which, a la Raiders of the Lost Ark, now lie buried beneath banyan trees and decades of growth. In addition to the formal batteries, dozens of lookouts and pillboxes are also scattered in several rings around the city - reminders that the entire Keelung area was designated a military zone「要塞」 by the Japanese during their 50-year rule on the island (1895-1945).
However, as with a good deal of Taiwan history, much in the way of details on northeast coast fortifications has been lost or buried away in dank files accessed only occasionally by the particularly diligent graduate student, ... leaving the visitor to make educated guesses about when structures were built and where they fit into island defense.
Today, these relics of the past are a definite enticement to visiting the Northeast Coast. Off the beaten path, even well-marked batteries rarely see more than a trickle of visitors. In a crowded place like Taiwan, their combination of solitude, great views (locations were chosen specifically for spying across the surrounding terrain) and enigmatic stone block structures are greatly appreciated!
After the Dutch abandoned Keelung for a second and final time in 1668, San Salvador - the earliest fort on Keelung Bay - sat crumbling and largely forgotten. China's supremacy in East Asia was still widely respected and its harbors were secure even without protective fortifications.
Expansion-minded Western traders undermined and ultimately demolished the Chinese peace, setting themselves up at prime anchorages around the region, playing local politics, and eventually delivering up entire slices of Asia to direct European rule (e.g., the Dutch in Batavia , the British in Singapore ; the Russians in Vladivostok ; and the French in Saigon ).
In response to this unprecedented threat from the sea, the Qing built two forts astride Keelung's inner harbor entrance. These quickly proved their worth by foiling at least three attempts by the British to shell the town during the First Opium War (1839-42).
The Qing later extended Keelung's fortifications and, by the early 1880s, some 10 artillery batteries fringed the bay. Most were set close to the water's edge to compensate for limited cannon range and, as a result, have since disappeared beneath container terminals and urban planning.
France's capture of the harbor in the autumn of 1884 drove the Qing defenders into the hills between Keelung and the Keelung River (see contemporary map here). Here they hastily built a second line of fortifications to frustrate any further French advance and provide forward bases from which to launch counterattacks. They also threw up trenches and protective works above the interior bank of the Keelung River to insure against a breach of the second line.
This network of fortifications left Keelung so well guarded that, when preparing to battle the armed resistance opposed to their takeover in 1895, Japanese military commanders chose to land their main force 30km to the south (at Gongliao [貢寮]) and approach the harbor from behind via a 2-day march over rugged mountain terrain. Even then, it took a fatal blunder by Chinese troops for the Japanese to storm Keelung's principal defenses without heavy casualties. Chinese records tell of a fierce battle fought in inclement weather along the slopes of Shiqiuling (獅球嶺) that caused heavy casualties on both sides. One version of events says that Cantonese soldiers guarding the battery mistook as Japanese the unfamiliar Chinese dialect spoken by an approaching Taiwanese relief force and opened fire. The Taiwanese, believing the Qing troops to have mutinied, fired back. The fighting decimated Shiqiuling's defenses. The Japanese took the fort the next morning and marched, almost unopposed, into Keelung.
Learning from experience, Japan reconfigured Keelung's defenses to handle potential threats from rival powers, including Russia, England, and (in the 1940s) the United States. Many of the Sino-French War era emplacements set next to Keelung Bay were abandoned and replaced by modern batteries set along strategic hilltops. New installations at Dawulun (大武崙), Baimiweng (白米甕), Shen Ao Keng (深澳坑), Gangziliao (槓子寮), and elsewhere afforded better defensive coverage and gave full play to the range and firepower of modern Western artillery.