(This January 23 story corrects number of asylum applications in paragraph 4 to make clear they refer to just the month of November)

FILE PHOTO: Czech President Milos Zeman next to his wife Ivana attends a news conference, after polling stations closed for the country's direct presidential election, in Prague, the Czech Republic January 13, 2018. REUTERS/Matej Stransky/Pool

PRAGUE (Reuters) - The number of asylum seekers crossing the Czech Republic dropped in 2017 to negligible numbers, police said on Tuesday amid a presidential election in which illegal migration has become a hot topic.

Although the country was largely untouched by a 2015 influx into the European Union of over one million migrants fleeing war and poverty in the Middle East Africa and Asia, fears of Muslim immigration have dominated the election debate.

Police said they detained 172 migrants in 2017 who sought to illegally transit the Czech Republic, mostly coming from Austria and heading onwards to neighboring Germany. They were mainly from Afghanistan, Iraq and Syria.

That compared with 2,294 detentions during the peak of 2015, and 511 in 2016. In separate data, the Interior Ministry said 116 people applied for asylum in November 2017, a tiny fraction of those doing so in west European countries.

Ex-communist central and eastern members of the EU with scant experience of non-Christian foreigners were the vanguard of a backlash against Germany’s decision in 2015 to open its doors to around a million mostly Muslim migrants.

They rebuffed an EU plan to distribute migrants among member states according to annual quotas, even though the vast bulk of migrants wanted to settle in the wealthier west rather than poorer east of the bloc.

In the event, the flow of migrants has largely dried up since borders were sealed along the migrants’ main overland Balkans corridor into the EU and Turkey stopped migrants taking boats across narrow sea channels to Greece.

Nevertheless, positions on migration may prove decisive in the Czech Republic’s closely contested presidential run-off on Jan. 26-27 in which academic Jiri Drahos is challenging incumbent Milos Zeman.

Zeman’s re-election campaign has seized on immigration as its main theme with the slogan, “Stop immigration and Drahos. This country is ours.”

Dozens of pro-Zeman billboards and media adverts suggest Drahos would be weak on rejecting EU pressure on each member state to accept migrants according to the quota system.

Like Zeman and all parliamentary parties, Drahos has repeatedly insisted that he rejects the idea of quotas and that the bloc should better guard its external borders against incoming asylum seekers.

Opinion polls ahead of the run-off vote show the soft-spoken Drahos, who favors closer EU integration, is neck-and-neck or slightly ahead of Zeman, who has courted the far right by rejecting Muslim immigration.