Early history Keelung was first inhabited by the
Ketagalan, a tribe of
Taiwanese aborigine. The
Spanish expedition to Formosa in the early 17th century was its first contact with the West; by 1624 the Spanish had built
San Salvador de Quelung, a fort in Keelung serving as an outpost of the
Manila-based
Spanish East Indies. The
Spanish ruled it as a part of
Spanish Formosa. Besides the native Taiwanese aborigines, the Spanish authorities from Spanish Manila settled North Taiwan (especially Keelung and
Tamsui) with a mixture of
Sangley Chinese (primarily
Fujianese traders),
Christian Japanese,
native Filipinos (e.g.
Kapampangan,
Tagalogs, etc.) as merchants and laborers, and some
Mexican Mestizos,
Mulattos,
Blacks,
Mexican Amerindians as soldiers and laborers and a few
Spanish Filipinos from
Spanish Philippines and rarely
Mexican Criollo Spaniards from
New Spain (Mexico) as
Catholic friar missionaries and colonial leaders, with the
Latin Americans from
New Spain (Mexico) brought over to North Taiwan from Manila through the
Manila-Acapulco Galleons. From 1642 to 1661 and 1663–1668, Keelung was under
Dutch control. The
Dutch East India Company took over the Spanish Fort San Salvador at
Santissima Trinidad. They reduced its size and renamed it Fort Noort-Hollant.
Qing dynasty First Opium War During the
First Opium War, the British
merchant ship Nerbudda shipwrecked near the
port of Keelung due to a typhoon in September 1841. Several months later, another British merchantman, the
brig Ann, also shipwrecked near Keelung on March 1842. Hundreds of survivors from both ships were captured by Chinese authorities and transferred to
Taiwan. Two senior Chinese officials, Dahonga and Yao Ying, filed a false report to the
Daoguang Emperor, claiming to have beaten off a British attack against Keelung. In October 1841, the
Royal Navy sloop
HMS Nimrod sailed to Keelung to search for survivors of
Nerbudda, but after they found out the Chinese sent them south for imprisonment,
Nimrod bombarded the city's port, destroying 27 cannon before returning to
British Hong Kong. Most of the survivors—over 130 from the
Nerbudda and 54 from the
Ann—were
summarily executed by the Chinese in August 1842. In 1863, the Qing Empire opened up Keelung as a trading port and the city enjoyed rapid development due to the abundant commodities such as placer gold and high quality coal found in the drainage area of
Keelung River. In 1875,
Taipeh Prefecture was created and included Keelung. In 1878, Keelung was formed into a
ting or sub-prefecture. Around the same time, the name was changed from
Ke-lang () to
Kilong (), which means "rich and prosperous land".
Sino-French War During the Sino-French War (1884–85), the French attempted an invasion of Taiwan during the Keelung Campaign.
Liu Mingchuan, who led the defence of Taiwan, recruited Aboriginals to serve alongside the Chinese soldiers in fighting against the French of
Colonel Jacques Duchesne's Formosa Expeditionary Corps. The French were defeated at the
Battle of Tamsui and the Qing forces pinned the French down at Keelung in an eight-month-long campaign before the French withdrew.
Empire of Japan A systematic city development started during the Japanese Era, after the 1895
Treaty of Shimonoseki, which handed all Taiwan over to Japan. A five-phase construction of Keelung Harbor was initiated, and in by 1916 trade volume had exceeded even those of Tamsui and Kaohsiung Harbors to become one of the major commercial harbors of Taiwan. Keelung was governed as , Kīrun District,
Taihoku Prefecture in 1920 and was upgraded to a city in 1924.
Republic of China After the
handover of Taiwan from Japan to the
Republic of China in October 1945, Keelung was established as a
provincial city of
Taiwan Province. The
Keelung City Government worked with the Keelung Harbor Bureau to rebuild the city and the harbor and by 1984, the harbor became the 7th largest container harbor in the world. The city became directly governed by the
Executive Yuan after Taiwan Province was streamlined in 1998 and became a
de facto first level division in 2018 following the dissolution of the
Taiwan Provincial Government. ==Geography==