As Italy threatened to let tens of thousands of migrants loose across the European Union, interior ministers attempted to hammer out a compromise deal to tackle the growing refugee crisis, agreeing a plan for EU-managed “hotspots” in Italy and Greece where migrants would be held and processed.

European officials would make sure migrants were fingerprinted, with asylum seekers sorted from illegal economic migrants. “Those who have no right to stay must be returned to their home country, and we agree that returns should increasingly be dealt by at EU level,” said Italy’s Interior Minister, Angelino Alfano.

The outline deal, which contained few specifics and did not spell out how illegal migrants would be sent home, followed an increasingly angry war of words that set Italy at loggerheads with its European neighbours, particularly France. After French authorities drafted in ranks of police to prevent migrants from Italy crossing the border at Ventimiglia, Italian police were forced to round up crowds of unwilling men, women and children and push them on to buses to remove them from the border area – providing unedifying images as the emergency summit opened in Luxembourg.

Stranded migrants spend night on rocks Show all 9 1 /9 Stranded migrants spend night on rocks Stranded migrants spend night on rocks Refugees on Ventimiglia rocks Migrants were supplied with emergency blankets after a cold night next to the sea Stranded migrants spend night on rocks Refugees on Ventimiglia rocks The migrants had slipped away from a bigger group staging a sit-in at a French, Italian border point Stranded migrants spend night on rocks Refugees on Ventimiglia rocks Around 50 people spent the night huddled on rocks Stranded migrants spend night on rocks Refugees on Ventimiglia rocks Red Cross workers arrived on Sunday morning with supplies Getty/AFP Stranded migrants spend night on rocks Refugees on Ventimiglia rocks Desperate for entry to the EU, the group risked being washed away by the sea overnight Stranded migrants spend night on rocks Refugees on Ventimiglia rocks The 50-strong group were mostly men Stranded migrants spend night on rocks Refugees on Ventimiglia rocks Authorities in the town of Ventimiglia are unsure what to do now Stranded migrants spend night on rocks Refugees on Ventimiglia rocks The northern Italian coastline is rocky and can be unforgiving Stranded migrants spend night on rocks Refugees on Ventimiglia rocks Many had risked their lives on dangerous boat crossings to get to Europe

As he arrived, Mr Alfano accused France of flouting Schengen open-border rules and called its stance at Ventimiglia a “punch in the face for Europe”. He added: “Everyone should learn what’s happening from the scenes at Ventimiglia. It’s a punch in the eye to those who want to look the other way.”

Hundreds of migrants from the Horn of Africa had been huddled on rocks by the sea, wrapped in foil, before they were put on buses and returned to the railway station.

Meanwhile, some residents of the Italian border town have begun driving migrants across the passport-free French border by car, for fees of €70 a head. Local police as estimated that 150 a day have been slipping through this way.

Mr Alfano’s French counterpart, Bernard Cazeneuve, denied that France had closed its border at Ventimiglia. “When migrants cross borders and it is established that they arrived in Italy, then it is only normal that they return to Italy,” he said, adding that French border police were allowed to check documents.

Migrants sleep by the sea yesterday in Ventimiglia, Italy, near the French border, which they have been barred from crossing (EPA)

France and Germany proposed what they called a “compromise” deal on how to distribute asylum seekers around the EU. German Interior Minister Thomas De Maiziere said: “There won’t be a result on this, but there might be a corridor leading to a compromise.”

But doubts remained over whether all EU countries would accept quotas. Earlier proposals to redistribute across the EU the 24,000 asylum seekers currently in Italy and 16,000 in Greece appear to have collapsed as one EU member after another backed away from the plan. The UK has said in no uncertain terms that it will not accept migrant quotas from southern Europe.

Britain’s Home Secretary, Theresa May, who attended the meeting with her European counterparts, instead called for action to tackle the human traffickers who brought migrants to Europe on rickety boats. The migrant crisis in the Mediterranean was “reaching to our borders”, she said, and “putting great pressure” on European towns and cities. “To deal with this issue in the long term we need to go after the criminal gangs who are plying a terrible, callous trade in human lives,” she added.

Save The Children has stepped up the pressure on the UK by calling for Britain to agree to take in 1,500 unaccompanied youngsters who had made the crossing to Europe.

If Italy fails to get what it considers to be sufficient support, Prime Minister Matteo Renzi has said he will take unilateral action under an as-yet undefined “plan B”. One option would be for asylum seekers in Italy to receive three-month residence passes that would allow them to travel around most of the EU, enabling them to head towards northern Europe.

A migrant is carried by Italian police in Ventimiglia, Italy. Police reportedly removed migrants from under a railway bridge (EPA)

But Mr Renzi is also thought to be considering get-out clauses in the 2003 Dublin agreement under which asylum applicants must remain within the EU state where they first register, which in practice limits thousands to staying in Italy and Greece.

Some observers say Article 17 of the agreement could be invoked, which would allow member states to “waive such responsibility for humanitarian and compassionate reasons”. This could mean refugees being allowed to leave Italy to join family already inside other EU countries.

Franco Miranelli, a senator in Mr Renzi’s Democratic Party, said the Italian Prime Minister would have to continue the tough talking at next week’s full summit of EU leaders. Mr Renzi is also expected to press the issue when he meets David Camerom in Milan on Wednesday.

Sources at the interior ministry said officials were considering whether to stop allowing migrants rescued from non-Italian vessels to disembark on Italian soil. This was backed by right-wing parliamentarians. Maurizio Gasparri, the deputy speaker of the Senate, said on Tuesday morning: “Last week the British [Navy] rescued hundreds of migrants and brought them to Italy. Great, you did well, but why not take them to the UK and do your part, too?”

Such a move might hasten the departure of HMS Bulwark, which is due to end its role helping to rescue migrants crossing the Mediterranean within three weeks.