European Union lawmakers in Brussels approved the plan in an emergency vote by 372 votes to 124, with 53 abstentions on Thursday.

A meeting of EU interior ministers earlier this week failed to reach an agreement on the refugee-sharing scheme, which was proposed by the EU's executive Commission in response to the record influx of refugees. The plan would enforce binding quotas for distributing refugees around the 28-country bloc.

The ministers are expected to meet again next Tuesday to reconsider the proposal. The parliament's approval on Thursday means that ministers will be able to endorse the plan if they can overcome opposition from a group of eastern European countries.

EU Commission Vice President Frans Timmermans thanked the parliament and said the vote would send a message to ministers that "the moment to act is now."

He added that the refugee crisis challenges Europe "on a political level, on a humanitarian level and I would even say on a moral level."

Not everyone on board

Hungary, Slovakia, Romania, Poland and the Czech Republic all reject the plan to spread refugees around the EU. Hungary had until this week been a main EU entry point for migrants fleeing conflict in the Middle East and Africa.

But in response to a flood of new arrivals, Hungary closed its border with Serbia, and announced plans to build fences along its borders with Romania and Croatia. Clashes between migrants and police at border crossings have drawn international criticism.

The EU's migration commissioner Dimitris Avramopoulos said Thursday that walls and violence were no solution to the migration crisis.

"The majority of people arriving in Europe are Syrians. They are people in genuine need of our protections. There is no wall you would not climb, no sea you wouldn't cross if you are fleeing violence and terror. I believe we have a moral duty (to) offer them protection," he said.

Hungary's Foreign Minister Peter Szijjarto defended his country's approach, saying security forces would protect the border "no matter what kind of outrageous and surprising reactions we receive from the international political arena."

Croatia says it has received more than 5,000 migrants since Hungary's crackdown, and authorities are warning they have limited capacities to accept more refugees. Germany is expecting to receive some 800,000 refugees this year - about four times as many as last year and a significant amount more than other EU member countries.

Have something to say? Add your comment below.

nm/jil (Reuters, AFP, AP)