BBC, BRUSSELS: EU leaders holding late-night talks in Brussels have agreed to relocate tens of thousands of migrants who have arrived in Italy and Greece.
Summit chairman Donald Tusk said 40,000 would be relocated to other EU states over the next two years.
However, there will be no mandatory quotas for each country.
The Greek debt crisis was also on the summit's agenda. Greece and its international creditors remain deadlocked after talks on Thursday.
Earlier, Mr Tusk called on EU member states to share the burden of the boat loads of illegal migrants who have crossed the Mediterranean.
New figures from the UN refugee agency UNHCR show that 63,000 migrants have arrived in Greece by sea this year and 62,000 in Italy.
"Leaders agreed that 40,000 persons in need will be relocated from Greece and Italy to other states over the next two years," Mr Tusk told reporters. "Interior ministers will finalise the scheme by the end of July."
Leaders also agreed to resettle another 20,000 refugees who are currently outside the EU. French President Francois Hollande said he expected most of them to be Syrians and Iraqis, AP reported.
Details of where the refugees will go have yet to be decided.
However, the UK has opted out of the scheme and nations in eastern Europe have refused to accept set quotas, so it will be only voluntary. This angered Italy's Prime Minister Matteo Renzi, who called the plan "modest".
Hungary, which has seen thousands of migrants cross its border by land, and Bulgaria, one of the EU's poorest countries, have both been granted exemptions.
Italy has sought more help from its EU partners to handle the thousands of migrants arriving by sea, many of whom are fleeing war and poverty in countries such as Syria, Eritrea, Somalia and Nigeria.
More than three million people who fled the Syrian civil war are being housed in neighbouring countries - far more than the EU has taken in.
The migrant crisis has been high on the agenda for the EU summit, which opened on Thursday.
The final day of the summit on Friday is due to focus on security issues, namely the Ukraine crisis and tensions with Russia.
Meanwhile, Italian Prime Minister Matteo Renzi lashed out at fellow EU leaders Thursday for rejecting mandatory migrant quotas amid sharp divisions over how to halt the tide of humanity washing up on Europe's southern shores, reports AFP.
Diplomatic sources said discussion at a late-running summit dinner became increasingly heated and emotional as Renzi accused his peers of looking after only their own interests.
If that's your idea of Europe, you can keep it, Renzi told his 27 counterparts, Italian sources told AFP.
Either give us solidarity or don't waste our time, they quoted him as saying.
A European source said the EU's two top figures, European Council President Donald Tusk and European Commission chief Jean-Claude Juncker, had clashed at the meeting but the two rejected the suggestion.
Don't believe those who are tweeting, leaking info. Whenever we have difficulties, we discuss these things between ourselves, Juncker told a press conference with Tusk early Friday.
Renzi said the outcome of the meeting fell short of what Italy needed. Relocation is a first step but for us this is not the solution to our problems.