Czech President Milos Zeman has won a second term in office following a tight run-off vote against rival Jiri Drahos.

Mr Zeman, who fiercely opposes immigration and objects to EU sanctions against Russia, took 52% of the vote to beat Mr Drahos, a pro-EU academic with no prior political experience.

Voter turnout on Saturday was over 66%.

The role of the Czech president is influential; Mr Zeman can name the prime minister and sign bills passed by parliament into law.

He has promised to give Prime Minister Andrej Babis, a billionaire businessman, a second chance to form a government after his minority cabinet lost a confidence vote in parliament last week.

Mr Zeman's current presidency does not end until March, so he plans to reappoint Mr Babis next month.

His position also allows him to appoint central bank board members and judges.

The presidential election has reflected divisions between low-income voters with lower education and those living in rural areas, who tend to vote for Mr Zeman, and wealthier and well-educated residents of bigger cities, who are likely to prefer Mr Drahos, correspondents say.

Mr Drahos has never belonged to any political party but he told the BBC that he wanted to "end the climate of populism and fear in Czech society" that has marked Mr Zeman's presidency.

In contrast to Mr Zeman, the 68-year-old Mr Drahos is a supporter of EU and Nato membership, however he opposes the EU's quota system for distributing migrants.

Blow to liberals

In the end just 175,000 votes separated the two men as Milos Zeman, one of Europe's most outspoken leaders, won a second term in office.

The result was a blow to liberal, pro-European voters who believed Jiri Drahos could bring about a change in Czech politics. It was vindication for those who believe in Mr Zeman's ability to shield the country from immigration and militant Islam.

But there are persistent concerns about his health; suffering from diabetes, he can now barely walk unaided.

There was prolonged applause when Mr Drahos said he and his team would "carry on" - no-one's sure yet exactly what that means.

Who is Milos Zeman?

Milos Zeman, 73

- Joined the Communist Party in 1968 during the "Prague Spring" but was expelled in 1970 for opposing Soviet intervention that crushed moves towards liberal reforms
- After communism fell he joined the left-leaning Social Democratic party and became leader in 1993
- In 2013 he became the third president of the Czech Republic since it split from Slovakia in 1993
- In his outspoken remarks on immigration he once said that Muslims were "impossible to integrate" into Europe
In the EU, he has fiercely opposed sanctions against Moscow and has made improving relations with China a priority