European interior ministers have agreed a deal to relocate 120,000 migrants across the continent in a vote passed by a significant majority.
Under the plan, migrants will be moved from Italy, Greece and Hungary to other countries in the EU.
Romania, the Czech Republic, Slovakia and Hungary voted against accepting mandatory quotas.
But a large majority of EU member states backed the plan, which will take effect over the next two years.
Finland was the only country of the EU's 28 members to abstain from the vote. Poland, who had opposed the proposal, voted for it.
The BBC's Europe correspondent Chris Morris said it was highly unusual for an issue like this - which involves national sovereignty - to be decided by majority vote rather than unanimous decision.
The matter must now be ratified by EU leaders at a second meeting in Brussels on Wednesday.
Earlier in the day, the Czech government warned that the plan was unlikely to work, even if it gained approval.
The UN refugee agency UNHCR has warned that the relocation scheme will be insufficient, given the large numbers arriving in Europe.
"A relocation programme alone, at this stage in the crisis, will not be enough to stabilise the situation," spokeswoman Melissa Fleming said.
The number of those needing to relocation will probably have to be revised upwards significantly, she said.
The UN says close to 480,000 migrants have arrived in Europe by sea this year, and are now reaching European shores at a rate of nearly 6,000 a day.