In just five years, Lin Fei-fan went from charging into Taiwan's legislature and occupying the building with hundreds of students to a senior job for the island's ruling party.

But his story could have been very different if he lived in Hong Kong, where student activists once brought the financial hub to a standstill as they took to the streets to demand democracy and freedoms.

Lin says he could only watch from afar as nearly all pro-democracy figures in nearby Hong Kong, about 800 kilometres southwest of Taipei were arrested or fled overseas in the year since Beijing imposed a controversial national security law in response to mass pro-democracy protests in the city.

"If I were in Hong Kong, I think I'll probably be in jail," said Lin, the 33-year-old deputy secretary-general of Taiwan's governing Democratic Progressive Party (DPP).

The recent events in Hong Kong have given Lin greater determination to defend Taiwan's sovereignty, he said -- and he is not alone.

As authorities in Hong Kong arrested pro-democracy supporters, including opposition politicians and newspaper editors, a growing number of people in Taiwan have reflected upon the island's future relationship with mainland China.

Since the Hong Kong protests broke out in 2019, more than 32% of respondents in Taiwan preferred a move toward formal "independence" -- twice as many as in 2018 -- according to a survey by Taiwan's National Chengchi University in June.

Fewer than 8% of respondents favoured "unification" with mainland China, while most wanted to maintain the status quo -- an arrangement by which Taiwan remains self-ruled, without an official declaration of independence.

Samuel Li, a student in the city of Kaohsiung in southern Taiwan said Beijing's crackdown on Hong Kong had escalated his distrust of the Communist regime.

"It reinforced my thoughts on the Chinese government in (that) they don't really do what they say. They always break their promises," he said. "I really wish that Taiwan could remain as it is today."

ESCALATING TENSIONS

Mainland China and Taiwan have been governed separately since the end of the Chinese civil war more than 70 years ago, when the defeated Nationalists retreated to the island.

Taiwan is now a flourishing multi-party democracy but the mainland's ruling Chinese Communist Party continues to view the island as an inseparable part of its territory -- despite having never controlled it.

Today, relations between Taipei and Beijing are at their lowest point in decades. In October, China's military sent a record number of warplanes into the air around Taiwan while Chinese diplomats and state-run media warned of a possible invasion unless the island toes Beijing's line.

But it hasn't always been this way. In fact, for much of the past 30 years, the possibility of conflict had seemed remote. Beginning in the early 1990s, many Taiwanese firms moved manufacturing operations to the mainland, where labour was cheaper, and authorities were hungry for outside investment to fuel economic growth.

Ties further flourished after the turn of the century. Taiwanese pop music and television became wildly popular on the mainland, and Chinese tourists flocked to visit Taiwan, promoted by state media as China's "treasure island."

In 2015, then-Taiwan President Ma Ying-jeou held a historic meeting with Chinese President Xi Jinping in Singapore -- but only as leaders of their respective political parties, the Nationalists and Communists. They vowed to reduce hostility, and Ma's party agreed that both Taiwan and mainland China belong to the same country and favoured closer economic cooperation.

However, relations deteriorated quickly after 2016, when Tsai Ing-wen from the traditionally pro-independence DPP won a landslide presidential election in Taiwan. Tsai has repeatedly highlighted and defended Taiwan's sovereignty, calling on Beijing to respect the wishes of the Taiwanese people.

In an interview with CNN last month, Tsai said the threat from Beijing is increasing "every day."

"China's plan towards the region is very different from before," she said. "It is more ambitious, more expansionist, and therefore things that were acceptable to them then may not be acceptable to them now."

In 2019, Beijing proposed a "One Country, Two Systems" formula for Taiwan, similar to that used to govern Hong Kong since its handover from Britain to China in 1997.

Under the agreement, Hong Kong was guaranteed to maintain a high degree of autonomy from the mainland government after its return to Chinese rule.

But since then, Hong Kong's pro-democracy camp and human rights activists have accused Beijing of betraying its promise and eroding democracy and civil liberties in the city, particularly in the wake of the 2019 protests and the imposition of the security law.

Speaking to CNN in October, Tsai said her citizens had rejected the model. "The Taiwanese people have said clearly that they do not accept 'One Country, Two Systems' as the formula that can resolve cross-strait issues," she said.

In January 2020 -- more than six months after the Hong Kong protests broke out -- Tsai won re-election by a significant margin over her Nationalist opponent Han Kuo-yu, who favoured closer economic ties with Beijing. Political observers have attributed her victory in part to her support for the Hong Kong protests.

Austin Wang, an assistant professor at the University of Nevada, Las Vegas who specializes in Taiwanese politics, said Beijing's crackdown in Hong Kong has played an important role in how Taiwan's younger generation views China.

"In the past, many Taiwanese were OK with 'One Country, Two Systems' because China promised that people's day-to-day life will remain the same. But the situation in Hong Kong suggests the opposite," he said.

"I think the issue is trust. When Taiwanese people regard China as not trustworthy, all promises or incentives rendered by China are discounted."

ECONOMIC INTERDEPENDENCE

But despite rising tensions across the Taiwan Strait in recent years, both Beijing and Taipei cannot afford to completely cut ties.

Last year, mainland China was Taiwan's largest trading partner and accounted for 26% of the island's total trade volume, according to Taiwan's Bureau of Foreign Trade.

Meanwhile, mainland firms are reliant on Taiwan -- particularly the Taiwan Semiconductor Manufacturing Company (TSMC) -- for its super-advanced semiconductor chips as China competes with the US in a technology race.

While the world's attention has often focused on Beijing's growing military threat over Taipei, Wang said many Taiwanese people also recognized the island's economy depends on its relationship with the mainland.

"Taiwanese people indeed realize the importance of cross-strait economic cooperation, and Taiwan's economy highly depends on China," he said.

"Nevertheless, Taiwanese people are also cautious about how much China can exploit this reliance for political gain."

In 2013, then-Taiwan President Ma proposed the Cross-Strait Service Trade Agreement, which would have opened up key Taiwanese industries -- including banking, health care and communications -- to investment from mainland China. The trade pact sparked concerns that closer economic integration with Beijing could damage Taipei's autonomy.

"Regional economic integration is an unstoppable global trend. If we do not face this and join in the process, it will only be a matter of time before we are eliminated from the competition," Ma said.

Lin, then a graduate student at National Taiwan University, subsequently led the 2014 Sunflower Movement, which successfully forced Ma's government to scrap the trade deal. The three-week long protest saw student activists occupy Taiwan's legislative building in the island's largest demonstrations in decades.

Today, Lin regularly advises President Tsai on key policies. He said Taiwan should reduce its economic reliance on China by building more partnerships with the United States, Japan, and the rest of the world.

"We should be aware that China is a country that often uses economic means to interfere in the politics of other nations," he said. "We will continue to interact economically with China in the future, but we must also keep our distance to minimize the impact of supply chain restructuring or China's internal instability to Taiwan."