Image copyright AP Image caption President Ma Ying-Jeou promises closer ties between Taiwan and China

As President Ma Ying-Jeou stood, arms aloft, in the pouring rain in Taipei this evening he savoured his moment of triumph.

He waved to his supporters as they sheltered under umbrellas. He smiled and hugged his wife. The crowd urged them to kiss.

The rain was soaking us all as we watched him.

The question at the heart of this election - how to deal with the growing power of a rising China - is one that many nations face. Taiwan is not alone in having to confront the issue.

But Taiwan has more at stake than anyone else. After all, China still claims Taiwan, has hundreds of missiles trained at the island and says it will reunify with it by force, if necessary.

Now Taiwan's voters have backed President Ma's policy of opening and seeking to lower tensions with China. They have chosen pragmatic engagement over fear.

He has pursued the policy since the start of his first term in 2008, opening new trade and transport links across the 100-mile-wide Taiwan Strait. He can continue to pursue it for another four years.

Mr Ma's victory, with more than 50% of the vote, is a better result than many expected. There are several reasons why he might have done badly in the election.

Taiwan has been suffering as the main markets for its hi-tech exports, Europe and America, have been in economic trouble. Unemployment is high by Taiwan's standards, at over 4%. Mr Ma also faced a third candidate in the poll who was expected to siphon votes from him.

Mr Ma greeted his victory saying Taiwan's voters have "given us support for our policy to put aside differences with the mainland. To search for peace and turn it into business opportunities".

"In the next four years there will be more harmony, more trust, with China," he said. "Less reason for conflict. I will ensure Taiwan's future is peaceful and stable."

Taiwan's election result is also the one that China and America were both quietly hoping for. They will be breathing a sigh of relief.

Approaching half of Taiwan's voters are not enthused by the idea of closer ties with mainland China

What happens on this island of 24 million has the potential to cause serious tensions between Asia's two big powers, and both wanted to see President Ma win.

Economic carrot

America underwrites the security of democratic Taiwan. That means it guarantees to protect it from China. Many believe if there is, one day, a conflict between America and China the spark will most likely be Taiwan.

So anything that lowers tensions over Taiwan is welcome in both Washington and Beijing.

China's communist leaders will be relieved. They have decided to try dangling an economic carrot in front of Taiwan and have responded to President Ma's economic overtures.

In Beijing a defeat for President Ma would have been seen as a defeat for President Hu Jintao too and the failure of China's current policy of trying to woo Taiwan with economic inducements.

This is a year of political change in China. The Communist Party will select new leaders in the autumn. Focused on their own internal politics, the last thing they wanted was a whole new political equation to confront when dealing with Taiwan.

And China's leaders had made it clear they did not want to see a win for Taiwan's opposition candidate Tsai Ing-wen. Her party has traditionally favoured seeking independence for Taiwan. They view her with suspicion.

In the United States meanwhile, the White House has already welcomed Mr Ma's re-election.

"Cross-strait peace, stability and improved relations, in an environment free from intimidation, are of profound importance to the United States," a statement said. "We hope the impressive efforts that both sides have undertaken in recent years to build cross-strait ties continue."

Image copyright Reuters Image caption The DPP's Tsai Ing-wen had hoped to become Taiwan's first female president

But it is also clear that a large number of Taiwanese remain sceptical about the downside of President Ma's policy towards China.

The outcome of the election was not an overwhelming vote for Mr Ma. In fact his support has dropped significantly since 2008. Then he received 7.6 million votes, 58% of the total. This time, with over 90% of ballots counted, he had 6.9 million votes, 51.6% of the total.

Tsai Ing-wen wasn't the candidate four years ago, but her Democratic Progressive Party's share has risen from 5.45 million votes, 41.6% in 2008, to 6.09 million, 45.6% in 2012.

So another way of looking at it is that Mr Ma's support has shrunk by three quarters of a million votes, his main opponent's rose by almost the same amount.

So approaching half of Taiwan's voters are not enthused by the idea of closer ties with mainland China.

Many of those who voted for Ms Tsai are ordinary, hard-working Taiwanese. They see threats to their jobs in opening to China and widening inequalities in Taiwanese society. They believe only big businesses are really benefiting from more business with Beijing.

Fears for freedom

They are also deeply suspicious about letting democratic Taiwan become too dependent on its giant, authoritarian neighbour.

So this election result is a win for President Ma, but with caveats.

And it's doubtful whether Beijing's economic carrot is converting many Taiwanese to supporting reunification.

Whether they voted for Ma or Tsai, I didn't meet any Taiwanese on the campaign trail or in polling stations, who want to compromise their democracy, or the freedoms they enjoy for economic benefits from China.

Quite the opposite, those who support President Ma do so because they think it is the best way of ensuring Taiwan keeps its freedoms.

So back to the question running through the election. Should China's rise be welcomed and embraced for the economic opportunities it brings, or should nations be mistrustful of China's assertive authoritarianism?

Taiwan's answer seems to imply both. The Taiwanese want a pragmatic pursuit of stability and prosperity, but not at any price.