Media playback is unsupported on your device Media caption Cindy Sui speaks to Taiwanese students holding a rally to demonstrate their support for the protests in Hong Kong

In January, 13 groups from Hong Kong and Taiwan gathered in Taipei for a weekend conference. The meeting attracted little attention, but it marked the first time democracy advocates, including representatives from Hong Kong's political parties and students from both sides, had met in an organised fashion.

Despite their proximity, the two sides previously worked little together. Taiwan has enjoyed full universal suffrage since 1996; but a year later, Hong Kong returned to Chinese rule. It seemed they had different fates.

Growing worries about Beijing have drawn the two sides closer, however, culminating in mutual support for the Occupy Central movement in Hong Kong and an Occupy Parliament movement in Taipei earlier this year.

"Taiwan's democracy and Hong Kong's democracy have the same threat - the Beijing government," said Lai Chung-chiang, a Taipei-based lawyer and long-time activist.

Image copyright AFP Image caption Students present John Leung, director of Hong Kong Trade Office in Taipei, with a protest letter on 29 Sep

Now the two sides feel they share similar goals and they are working together more closely, something that will surely worry Beijing.

Hong Kong supported us and now we're supporting them Karen Cheng, Taiwanese activist

After all, Taiwan could be seen as a bad influence - it's had decades, and some would say more than a century, of experience fighting for democracy. Some of its people are deeply anti-China and want independence, and its protesters have been bolder and more defiant than Hong Kong's.

Many believe the success of Taiwan's movement greatly encouraged Hong Kong activists.

Two months after the January meeting, Taiwanese students occupied parliament for 24 days and didn't leave until the legislature agreed to pass a law allowing stringent public supervision of agreements signed with China.

"Because Taiwan's occupy movement was successful, Hong Kong people felt it was also possible for them," said Mr Lai.

Many Hong Kong students came here then to learn, including how to disseminate information online in timely manner and co-ordinate supplies and donations.

Image copyright Getty Images Image caption Student activists organised a protest at the Hong Kong office in Taipei on Monday

'Support each other'

In recent days, Taiwanese activists have flown to Hong Kong to lend support.

One of them, Karen Cheng, has just returned.

"We strongly care about Hong Kong because we really cherish our freedom and democracy," said Ms Cheng. "We're worried that today's Hong Kong will be tomorrow's Taiwan (if it one day reunifies with the mainland)."

Beijing should have foreseen these fears as it worked in recent years to woo Taiwan - the next on a list of territories China feels were unfairly taken away when it was weak and wants to take back, to unify the "motherland".

Beijing had hoped that allowing Hong Kong to prosper economically after the 1997 handover would convince Taiwan to reunify.

But whether or not it grants Hong Kong democracy will directly affect whether the Taiwanese trust China, much less want to reunify.

Image copyright EPA Image caption The protests in Hong Kong have seen thousands of people take to the streets

Image copyright Reuters Image caption Some protesters slept on the streets overnight to enforce a blockade of key areas

Chinese President Xi Jinping's recent statements that Taiwan should accept the same "One Country, Two Systems" formula under which Beijing rules Hong Kong, following his refusal to allow Hong Kong people to directly elect their leader, indicate he may be clueless about what Taiwanese people care about the most - self rule.

Taiwan's President Ma Ying-jeou has rejected Mr Xi's suggestion, saying: "We fully understand and support Hong Kong's demand for universal suffrage." Giving Hong Kong people the right to choose their own leader would be a "win-win" situation for Hong Kong and China, he added.

But he's limited in how much more he can say.

Mr Ma hopes to meet Mr Xi at the Apec leaders' summit in Beijing in November and he doesn't want to jeopardise future negotiations with China.

For Beijing, it now has to reckon with two issues it dealt with separately being linked, said Arthur Ding Shu-fan, a research fellow at National Cheng-chi University's Institute of International Relations.

"They will have to figure out how to reassure Taiwan to not to support Hong Kong," said Mr Ding.

It will also likely build a long blacklist of Taiwanese activists to keep out of Hong Kong. Already, student leaders Lin Fei-fan and Chen Wei-ting have been denied entry.

But besides them, there are many more people who now feel connected to Hong Kong - no longer seen as just a place for flight transfers or shopping.

"They supported us (back in March and April) and now we're supporting them," said Ms Cheng. "Supporting each other will help both sides."