Taiwan has unveiled its first domestically-made submarine as it bolsters its defences against a possible Chinese attack.
President Tsai Ing-wen presided over the launch ceremony in the port city of Kaohsiung on Thursday.
US officials have warned that China could be militarily capable of mounting an invasion within the next few years.
Taiwan is a self-governing island which China regards as a renegade province and has vowed to reclaim one day.
Most observers believe China will not attack the island imminently, and Beijing has said it seeks peaceful "reunification" with Taiwan.
But at the same time it has warned against Taiwan formally declaring independence and any foreign support. It has increasingly sought to put pressure on the island with its military drills in the Taiwan Strait, including several conducted this month.
"History will forever remember this day," said Ms Tsai as she stood in front of the towering submarine draped in the emblem of Taiwan's flag.
She added that the idea of a domestically-made submarine had previously been considered "an impossible task… but we did it".
Building their own submarines has long been a key priority for Taiwan's leaders, but the programme accelerated under Ms Tsai who has revved up military spending to nearly double its budget during her tenure.
The $1.54bn (£1.27bn) diesel-electric powered submarine will undergo several tests and will be delivered to the navy by the end of 2024, according to military officials.
It has been named the Haikun after a mythical massive fish that can also fly, which appears in classic Chinese literature.
Another one is currently in production. Taiwan aims to eventually operate a fleet of 10 submarines - including two older Dutch-made boats - and equip them with missiles.
The head of the domestic submarine programme Admiral Huang Shu-kuang told reporters last week that the goal was to fend off any attempt from China to encircle Taiwan for an invasion or impose a naval blockade.
It would also buy time until US and Japan forces arrive to aid Taiwan's defence, he added.
When asked by reporters about the submarine on Thursday, a Chinese defence ministry spokesperson said it was "idiotic nonsense" to try to stop their military's actions in the Pacific.
"No amount of weapons [Taiwan's ruling] Democratic Progressive Party buys or makes can stop reunification with the motherland," he added.
In a piece published earlier this week, state media outlet Global Times said Taiwan was "daydreaming" and the plan was "just an illusion".
It also claimed China's military "has already constructed a multidimensional anti-submarine network all around the island".
Observers agree that the new submarines could help boost Taiwan's defence.
Taiwan's 10-submarine fleet would pale in comparison to China's, said to currently comprise more than 60 boats including nuclear-powered attack submarines, with more on the way.
But the island has long pursued an asymmetric warfare strategy where it aims to build a more agile defence force to face down a larger and well-resourced enemy.
The submarines could "aid Taiwan's relatively small navy in taking initiative against China's mighty navy" by conducting "guerrilla style warfare with their stealth, lethality and surprise capabilities", noted William Chung, a military researcher with the Institute for National Defense and Security Research in Taiwan.
In particular, he said, they could help guard the various straits and channels that link the so-called "first island chain", a network of islands including Taiwan, Philippines and Japan seen as a possible battlefront for any conflict with China.(BBC)