EU ministers have fallen short of a target to agree the redistribution of 40,000 migrants who have arrived in Italy and Greece.
At a meeting in Brussels they agreed to start the relocation of just over 32,000 in October.
The allocation of the remainder will be decided by the end of the year, officials said.
About 150,000 migrants fleeing war and poverty are estimated to have reached Europe so far this year.
The majority have arrived in Greece and Italy where they are being looked after in overflowing camps.
Both countries have called on other EU states to share the burden.
The 40,000 figure was proposed by the European Commission following a shipwreck in the Mediterranean in April that left nearly 800 people dead.
Migration into Europe
migrants crossed into Europe so far this year
149% increase from 2014
63,000 migrants reached Greece by sea
62,000 migrants reached Italy by sea
10,000 on Hungary/Serbia border in May
But while EU states have agreed to help, they have been been bitterly divided on the details of any redistribution.
Luxembourg, which currently holds the EU’s rotating six-month presidency, said home affairs ministers had agreed to relocate 32,256 Syrians, Eritreans, Iraqis and Somalis.
EU home affairs commissioner Dimitris Avramopoulos told reporters: “We are almost there. The remaining 8,000 will be allocated by the end of this year, by December.
“I’m disappointed this did not happen today, but it was a very important step forward.”
Spanish home affairs minister Jorge Fernandez Diaz said Spain was critical of the relocation plan “because it will create a pull factor” attracting more migrants to Europe.
Germany offered the most places – 10,500 for asylum seekers and 1,600 for migrants, followed by France with 6,752 places for asylum seekers and 2,375 for migrants.
The UK, Denmark and Ireland were allowed to opt out of the programme under EU treaties but Ireland agreed to take 600 asylum seekers and 520 refugees while Denmark and Britain agreed to accept 1,000 and 2,200 refugees respectively.
Meanwhile, aid group Medecins Sans Frontieres (MSF) has warned that thousands of migrants and asylum seekers are stranded in poor conditions across several Greek islands.
It said that about 5,000 people, mainly from Syria, Afghanistan and Iraq, had arrived on the island of Lesbos in the past few days and that a reception centre there was “on the verge of collapse”.
It said that on the island of Kos, about 700 people were crammed into a dilapidated building with a maximum capacity for about 200.
“Leaving people to fend for themselves in an abandoned building or a field full of garbage where there is hardly any water or latrines is simply unacceptable,” said Elisabetta Faga, MSF emergency co-ordinator in Lesbos.
MSF called for the EU to do more to help Greece.