EU leaders have tonight stitched up a deal to force countries to take in refugees against their will.

Eastern European countries were told they would have to welcome thousands of asylum seekers under the mandatory quota system to relocate 160,000 people from Greece and Italy after they were out-voted at a Brussels summit.

Diplomats warned the decision to over-rule the autonomy of countries on such a sensitive issue was a ‘big moment’ in the history of the union and could lead to ‘blood on the walls’.

Eastern European countries were told they would have to welcome thousands of asylum seekers under the mandatory quota system to relocate 160,000 people from Greece and Italy after they were out-voted at a Brussels summit. Pictured: Hundreds of desperate refugees cross the Hungarian border into Austria today

Slovakia immediately announced it would defy the decision following the deal, with Prime Minister Robert Fico saying that 'as long as I am prime minister, mandatory quotas will not be implemented on Slovak territory'

The Czech Republic, Slovakia, Romania and Hungary tried to block the plan but their vehement opposition was over-ridden after it was decided to use a majority vote at the meeting of interior ministers rather than consensus.

Britain is able to refuse to take part in the quota system to distribute refugees already in Europe as it has an opt-out, along with Denmark.

Slovakia immediately announced it would defy the decision. Prime Minister Robert Fico said: ‘As long as I am prime minister, mandatory quotas will not be implemented on Slovak territory.’

A diplomat from one of the countries opposed to the plan described the atmosphere around the council table as ‘terrible’, adding: ‘This is a bad day for Europe.’

Countries in favour of the quotas showed little grace after forcing them through.

French Interior Minister Bernard Cazeneuve said the plan had been approved by a ‘crushing majority’.

‘This decision is testament to the capacity of Europe to take responsibility and progress,’ he said.

The controversial decision came as Theresa May demanded the EU ‘get on with the job’ of securing its borders as figures showed only a third of those arriving in Italy and Greece are being properly registered and fingerprinted.

The European Commission admitted the chaos that is allowing tens of thousands to stream into Europe unchecked was ‘not optimal’.

At tonight’s summit, ministers used a majority vote to force the crucial decision on the European Commission plan to relocate a further 120,000 asylum seekers from Italy and Greece.

French Interior Minister Bernard Cazeneuve (above) said the plan had been approved by a ‘crushing majority’

Countries had already agreed a plan to distribute 40,000 voluntarily at a meeting last week but the new mandatory quotas being pushed by countries including Germany were highly contentious.

Hours before the meeting German Chancellor Angela Merkel pledged to do everything to resolve the redistribution of refugees by consensus, rather than simply outvoting Eastern European countries that strongly oppose the plan.

She said: ‘It’s worth every effort to do everything to be able to decide by consensus among the 28 member states, rather than by qualified majority, on important questions such as the distribution of refugees.’

But at the summit the decision was taken by a majority vote, with four Eastern European countries opposing and Finland abstaining.

As long as I am prime minister, mandatory quotas will not be implemented on Slovak territory Slovakia Prime Minister Robert Fico

Britain did not have a vote because it has already opted out of taking part.

Prague warned that the scheme would be unworkable and could end in ‘big ridicule’ for governments and EU authorities.

‘We will soon realise that the emperor has no clothes. Common sense lost today,’ Czech Interior Minister Milan Chovanec tweeted after the vote.

Ukip MEP Jane Collins said: ‘There is now no escaping the fact that immigration will be decided by Brussels.

‘What we have witnessed today is four countries who wish to control who settles in their country being outvoted by foreign government.’

As she arrived at the summit, Home Secretary Theresa May said the EU needed to take urgent measures to tackle the crisis.

She said: ‘We need to get on with the job of the wider measures that need to be taken, of ensuring we are breaking the link for economic migrants between making this dangerous journey and settling in Europe so we need to return those people who are illegal economic migrants and have no right to be here.

‘And we need to make sure that people arriving at Europe’s borders are being properly dealt with and properly fingerprinted so that decisions can be made and where they’re illegal economic migrants they can be returned.’

Hours before the meeting German Chancellor Angela Merkel (left) pledged to do everything to resolve the redistribution of refugees by consensus, rather than simply outvoting Eastern European countries that oppose the plan. It came as Theresa May (right) said the EU needed to take urgent measures to tackle the crisis

According to EU figures, in the first seven months of this year 252,000 people illegally crossed the borders into Greece and Italy, but only 85,000 were properly registered and fingerprinted as they should be under EU rules.

The leaders of all 28 member states – including David Cameron – will today head to Brussels to discuss how the EU if failing to cope with the migration crisis.

In a letter to the leaders ahead of the summit, European Council president Donald Tusk said they needed to look at the ‘brutal reality’ of the situation.

‘We as Europeans are currently not able to manage our common external borders, hence some States decided to protect themselves by closing their national ones,’ he wrote.

‘The protection of the European community is our first duty and obligation and we have failed on this front.’

The EU’s border-free travel area, the Schengen Zone, has unravelled in the past fortnight as Germany, Austria, Slovenia have brought back checks.

It is highly embarrassing for the European Union who just a few months ago celebrated the 30th anniversary of the signing of the agreement.

At tonight’s summit, ministers used a majority vote to force the crucial decision on the European Commission plan to relocate a further 120,000 asylum seekers from Italy and Greece. Pictured above: Syrian refugees help an elderly woman disembark an overcrowded dinghy upon arriving on the Greek island of Lesbos today

Syrian refugees arrive at a beach on the Greek island of Lesbos in overcrowded dinghies after crossing a part of the Aegean Sea from the Turkish coast

Commissioner for Migration Dimitris Avramopoulos said: ‘On a continent where nations once shed blood to defend their territories, today borders only exist on maps.

‘Removing borders, ensuring safety and building trust took many years after two devastating world wars.

‘The creation of the Schengen area is one of the greatest achievements of the EU and it is irreversible.’

Tory MEP Timothy Kirkhope said: ‘My greatest fear is that forcing such a divisive issue to a vote will have negative consequences in the long run. All 28 EU countries need to work together to manage this crisis and alienating major European states makes finding common solutions even harder.

‘This is not a long term solution to this crisis; It is a sticking plaster, and the way it has been handled diminishes much of the good will that will be needed to find genuine long term and more permanent solutions.