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 finalize 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 has yet to be decided.
The scheme was made voluntary after some nations in eastern Europe refused to accept set quotas. The UK also opted out of the scheme, using one of its exemptions as agreed in the EU Lisbon treaty.
Hungary, which has seen thousands of migrants cross its border by land, and Bulgaria, one of the EU’s poorest countries, have also both been granted exemptions.
This angered Italy’s Prime Minister Matteo Renzi, who called the plan “modest”.
Read more at bcc.com