Italian prime minister Matteo Renzi speaks with the media after the EU summit in Brussels (AP)

European Union leaders have agreed to relocate 40,000 migrants from Italy and Greece to other EU countries over the next two years, in an effort to share the burden of a growing crisis.

EU president Donald Tusk said the agreement was reached after an overnight summit early this morning, to show "solidarity with frontline countries".

French president Francois Hollande said the EU will also resettle 20,000 refugees, "essentially from Syria and Iraq, who at this moment are in camps and who will be reinstalled in Europe".

The migrant crisis has caused tensions among EU countries.

Italian prime minister Matteo Renzi had earlier made an emotional plea to the leaders for help.

More than 114,000 migrants have been plucked from the Mediterranean trying to reach Europe so far this year, according to the International Organisation for Migration. Some 2,600 have died or gone missing during the often perilous sea crossing.

The EU wants to oblige member countries to share the 40,000 Syrians and Eritreans requiring international protection who are expected to arrive in Italy and Greece over the next two years.

However, many of the 28 nations are refusing to have migrant numbers dictated to them from Brussels.

The leaders did not spell out any quotas for how many refugees each country will take. EU interior ministers will finalise the plan next month.

Mr Tusk said a final agreement must also include support for Hungary, which has received a third of all EU asylum-seekers since the beginning of the year.