Britain has come under fire from the Italian Prime Minister and the United Nations for refusing to accept its share of migrants who crossed the Mediterranean Sea to seek asylum in Europe.

In an “emotional” outburst, Italian PM Matteo Renzi slammed other leaders at an EU conference Thursday night, saying “you aren’t worthy of calling yourselves Europe.”

A senior UN figure also criticized the UK for refusing to share the burden of migration felt by so-called ‘frontline’ European nations such as Italy and Greece.

European leaders met for a working dinner in Brussels which continued into the early hours of the morning before finally reaching an agreement on the voluntary sharing of asylum seekers.

British Prime Minister David Cameron used the UK’s veto to opt-out of the EU-wide plan to redistribute 40,000 migrants across the continent.

Poland, the Czech Republic, Slovakia and other ex-communist countries had argued their economies are not robust enough to cope with an influx of migrants. Bulgaria and Hungary secured exemptions from the scheme.

The agreement will resettle 40,000 asylum seekers currently in Italy and Greece and another 20,000 outside the EU, mainly those affected by the conflicts in Syria and Iraq.

Italy had hoped for mandatory quotas to spread Mediterranean migrants across the continent, however these proposals were rejected by other European nations.

An exasperated Renzi attacked European nations that rejected calls to share the migrant burden currently felt by those bordering the Mediterranean Sea.

“If you don’t agree on 40,000, you aren’t worthy of calling yourselves Europe. If that’s your idea of Europe, you can keep it,” the Italian PM told EU leaders.

READ MORE: ‘Overburdened with immigrants’: Hungary suspends EU rules on accepting refugees

EU Commission President Jean-Claude Juncker told heads of state, “We have to find out if the system works. It doesn’t matter if it is voluntary or mandatory, it is whether it can help 60,000 refugees.”

Juncker responded to leaders’ objections to the plan’s methodology by saying “I don’t give a damn.”

A senior UN figure for international migration and development said it was wrong for some European countries to reject migrants.

“All member states should participate in the voluntary settlement, including Britain, Ireland and Denmark,” Special Representative of the UN Secretary-General Peter Sutherland told BBC Radio 4.

“This is a question basically of European solidarity. Why should Greece and particularly Italy take this unfair burden of responsibility for people who are refugees escaping from persecution?”

Although an agreement has been reached, diplomats expect more quarrels in the future over how to implement the deal.

READ MORE: Calais chaos: Strike shuts down French port, migrants target UK-bound lorries (VIDEOS)

“There’s much, much more argument to come. I don’t yet see the full way forward,” a senior EU diplomat told the Guardian.

Factors such as the size of a country’s economy and population will be taken into account when the distribution plan is drawn up.

European leaders agreed the criteria for sharing migrants must be decided by the end of July.

The eleventh-hour settlement in Brussels followed a blunt attack on the UK by Calais Mayor Philippe Mignonet, who accused Britain of being “blind and hypocritical” in its approach to migration.

Calais has witnessed dramatic scenes in recent days, as migrants have been photographed attempting to stowaway on UK-bound trucks left stranded in the port by a French ferry workers’ strike.

Mignonet urged the British PM to visit Calais to hold an emergency summit on how to address the 3,000 migrants now camped in the city.