(Adds phone call between Greek premier and Turkish president)
By Karolina Tagaris
ATHENS, Aug 20 (Reuters) - Greece said on Friday it had completed a 40-km fence on its border with Turkey and a new surveillance system was in place to stop possible asylum seekers from trying to reach Europe following the Taliban's takeover of Afghanistan.
Events in Afghanistan have fuelled fears in the European Union of a repeat of the 2015 refugee crisis, when nearly a million people fleeing war and poverty in the Middle East and beyond crossed to Greece from Turkey before travelling north to wealthier states.
Greece was on the frontline of that crisis and has said its border forces are on alert to make sure it does not become Europe's gateway again.
The Afghanistan crisis had created "possibilities for migrant flows," Citizens' Protection Minister Michalis Chrisochoidis said after visiting the region of Evros on Friday with the defence minister and the head of the armed forces.
"We cannot wait, passively, for the possible impact," Chrisochoidis told reporters. "Our borders will remain safe and inviolable."
Chrisochoidis said the extension to the existing 12.5-kilometre fence had been completed in recent days, as well as a hi-tech, automated electronic monitoring system.
Migrant arrivals to Greece, either by land or by sea, have overall slowed to a trickle since 2016, when the EU agreed a deal with Turkey to stem the flows in exchange for financial support.
Prime Minister Kyriakos Mitsotakis and Turkish President Tayyip Erdogan discussed Afghanistan on the phone on Friday, with Erdogan saying Afghanistan and Iran - a key route for Afghans into Turkey - should be supported or a new migration wave was "inevitable," a statement from his office said.
Greece and Turkey, NATO allies and historic rivals, have long been at odds over migrant issues and competing territorial claims in the eastern Mediterranean.
Greece has hardened its migration policy in recent months by fencing off its migrant camps and launching EU-wide tenders to build two closed-type facilities on the islands of Samos and Lesbos, close to Turkey.
It has in the recent past stopped people entering its waters, though it denies widely reported allegations of so-called "pushbacks."
(Reporting by Karolina Tagaris in Athens; additional reporting by George Georgiopoulos in Athens and Ece Toksabay in Ankara; editing by Grant McCool)
Our Standards: The Thomson Reuters Trust Principles.