Czech President Milos Zeman won a second term in a presidential election on Saturday, gaining the backing of voters for his tough stance against immigration and his courtship of Russia and China.

In the run-off against strongly pro-European Union academic Jiri Drahos, Zeman scored 51.4 percent to 48.6 percent for his challenger.

Zeman, 73, is the last prominent figure among active politicians from the country’s post-communist transitional period in the 1990s, and has shifted from being a centre-left prime minister 16 years ago to being a president with leanings toward the far-right.

The vote showed Czech voters’ concerns over security despite a period of fast economic growth and rising wages. Immigration was a key issue, more than two years after the European Union first faced a major influx of refugees – almost none of whom ever appeared in the Czech Republic.

Zeman has been a polarising force, publicly belittling opponents and sniping at intellectual elites and the media. He was one of the few European politicians to back Donald Trump in the 2016 U.S. presidential election

Zeman has benefited from rising hostility to immigration, especially to people coming from Muslim states, although the country of 10.6 million received just 116 asylum applications in November last year and has only a tiny Muslim community.