Taiwan's incumbent president was re-elected on Saturday as official tallies showed he held a near-unassailable lead in the vote-count and the opposition conceded defeat.

The result, which points to a continuation of the detente between Taiwan and China, should reassure both Beijing and Washington at a time of political transition for both superpowers.

The elections had been expected to be tight, but the Central Election Commission said that with most votes counted, the Nationalist Party's Ma Ying-jeou, who has fostered warmer ties with China, had about 51.5 percent of the vote versus about 45.7 percent for Tsai Ing-wen of the opposition Democratic Progressive Party (DPP).

We have won, Ma, 61, shouted to supporters at party headquarters as they cheered and clapped in pouring rain.

In the next four years, cross-strait relations will be more peaceful, with greater mutual trust and the chance of conflict will be less.

Tsai conceded defeat and said she was quitting as DPP party chief.

However, Ma's victory will be much reduced from the near 17-point margin he had over the DPP at the last election in 2008.

But the Nationalist Party was also projected to get a clear majority in parliament, which should give Ma a fillip in pushing through policy. Television said the Nationalists would get about 65 seats in the 113-member legislature, although that is also lower than the 81 seats they had in the outgoing house.

We will continue to let economic growth flourish, protect cross-strait peace and friendly relations to achieve more concrete results in cooperation in important areas, said Lien Chan, the honorary chairman of the Nationalists.

But in an acknowledgement of the reduced majority, he added: We need to discuss thoroughly the criticism the voters have handed to us.

Even early in the day, Ma radiated confidence.

I see a little sunshine now, he told reporters as he cast his vote at a polling station in a Taipei church after a slight drizzle eased.

Opposition leader Tsai was also confident but appeared to have lost ground to the incumbent after a strong showing in the campaign because of perceptions that she was not as inclined to closer economic integration with China.

The DPP's independence-leaning stance has long angered Beijing, which deems Taiwan a renegade province and considers U.S. arms sales to the self-ruled island as the top obstacle to improved ties between the United States and China, now the world's two biggest economies.

Under Ma, the Nationalists have pursued detente with China -- closer economic ties while vowing not to declare independence nor seek unification.

A Ma victory should also go down well in the United States, which holds presidential elections later this year, as Washington would be keen to take at least one potential irritant in bilateral ties with China off the table.

SMOOTH VOTE

Like the run-up to the election, the voting was smooth. Unlike in 1996, when China fired missiles into waters off Taiwan before the island's first direct presidential election, Beijing has learnt to temper any response to avoid antagonising voters into backing the DPP.

Nearly 200,000 Taiwanese returned from overseas for the poll according to local media reports, cramming flights in a last minute rush to cast ballots. In a measure of the easing ties with the mainland, most of them came over from China.

Ma and Tsai are both former law academics with doctorates from Harvard and the London School of Economics respectively. Tsai, the first woman to bid for Taiwan's presidency, appeared unable to press home her charges that Ma had pursued his pro-China policy with little regard to rising costs of living and a widening income gap at home.

Ma has lost a lot of votes, said former DPP legislator Wenjia Luo. But the people's dissatisfaction was not enough to make him lose the election.

A third presidential candidate, former Nationalist party member James Soong who now leads a splinter party, trailed far behind with around 2.8 percent of the vote.

A Ma win is likely to provide a short-term boost to Taiwan's stock market and the Taiwan dollar when markets reopen on Monday, analysts have said. Many economists see stronger ties with China's vast markets as vital for Taiwan's heavily export-dependent economy because of the slowdown elsewhere in the world.

(Editing by Raju Gopalakrishnan and Jonathan Thatcher)