An Afghan migrant was shot by Bulgarian border guards while trying to cross from Turkey and died on his way to hospital, the interior ministry said Friday.

It was the first known deadly police shooting since the beginning of the crisis which has seen an influx of hundreds of thousands migrants into Europe, and came as the EU and Turkey reached a deal to stem the flow.

The victim was among of a group of 54 migrants spotted by a patrol near the southeastern town of Sredets close to the Turkish border late on Thursday, said a senior official at the interior ministry, Georgy Kostov.

They "did not obey" a police order to stop, he said. "None of the migrants were armed, but they put up resistance."

Patrol officers had fired in the air and "a migrant was injured by a ricochet -- according to the testimony of one of the three police officers -- and succumbed to his injuries on the way to the hospital," he said.

The migrants said they were Afghans but had no papers, Kostov added.

The spokesman for the UN refugee agency (UNHCR) in Bulgaria, Boris Cheshirkov, called the incident "very regrettable".

"This plan for barriers, fences and police cannot solve the problem of desperate people," he told AFP, recalling a UNHCR appeal to Bulgaria, launched last spring, not to return migrants.

He said it was the first case of a fatal police shooting of a migrant on the EU's borders.

The incident prompted Prime Minister Boyko Borisov to leave an EU summit in Brussels on the migrant crisis and fly back home late Thursday.

European Council President Donald Tusk said in Brussels that Borisov told him about the Turkish border shooting just before he left the summit, adding: "It shows how important our discussion was. Prime Minister Borisov is aware that we are ready to help."

A member of the European Union but not of the passport-free Schengen zone, Bulgaria is on the fringes of the main flow of migrants heading to western Europe through Greece, Macedonia and Serbia.

Story continues

The country has however seen tens of thousands of migrants transiting since the beginning of the year.

In a move to buttress its porous 260-kilometre (160-mile) border with Turkey, Bulgaria built a 30-kilometre razor wire fence along part of it and dispatched some 2,000 border guards, police and army to guard the rest.

Unlike Greece, migrants entering Bulgaria are subject to a registration procedure and must normally wait several months before obtaining refugee status allowing them to travel in Europe.

EU leaders approved late Thursday an action plan with Turkey to help stem the flood of migrants in return for concessions from Brussels, including easier visa access.