The Spanish expedition to Formosa in the early 17th century was its first contact with the West; by 1624 the Spanish had built , 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. 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. The Dutch had three more minor fortifications in Keelung and also a little school and a preacher. When Ming Dynasty loyalist Koxinga successfully attacked the Dutch in southern Taiwan  (Siege of Fort Zeelandia), the crew of the Keelung forts fled to the Dutch trading post in Japan. The Dutch came back in 1663 and re-occupied and strengthened their earlier forts. However, trade with Qing China through Keelung was not what they hoped it would be and, in 1668, they left after getting harassed by aboriginals. Given the strategic and commercial value of Taiwan, there were British suggestions in 1840 and 1841 to seize the island. In September 1841, during the First Opium War, the British transport ship "Nerbudda" became shipwrecked near Keelung Harbour due to a typhoon. The brig "Ann" also became shipwrecked in March 1842. Most of the crew were Indian lascars. Survivors from both ships were transferred by authorities to the capital Tainan. The Taiwan Qing commanders, Ta-hung-ah and Yao Ying, filed a disingenuous report to the emperor, claiming to have defended against an attack from the Keelung fort. In October 1841, HMS "Nimrod" sailed to Keelung to search for the "Nerbudda" survivors, but after Captain Joseph Pearse found out that they were sent south for imprisonment, he ordered the bombardment of the harbour and destroyed 27 sets of cannon before returning to Hong Kong. Most of the survivors—over 130 from the "Nerbudda" and 54 from the "Ann"—were executed in Tainan 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.