European Union leaders have pledged another €1bn (£700m, $1.1bn) to help UN agencies support Syrian refugees in the Middle East, as part of renewed efforts to tackle the EU's migrant crisis.
More help will be extended to Syria's neighbours, where millions have fled since the country's conflict began.
The leaders also agreed on strengthening EU external borders.
European Council President Donald Tusk warned that "greatest tide of refugees and migrants is yet to come".
"We need to correct the policy of open doors and windows," he said.
About half a million migrants have arrived in Europe this year, exposing deep divisions within the EU.
The emergency summit in Brussels got under way amid a bitter row over the relocation of 120,000 migrants.
Several countries oppose the scheme, which imposes mandatory quotas on EU members, with Slovakia launching a legal challenge.
Despite this, EU Commission President Jean-Claude Juncker described the talks as "excellent", taking place in a "better than expected atmosphere".
Announcing the measures, Mr Tusk said the aim of the meeting had been to "end the public finger pointing" among members.
He said about four million Syrians had fled to neighbouring countries, meaning "we should be talking about millions of potential refugees trying to reach Europe from Syria alone, not to mention Iraq, Afghanistan, Eritrea and other places".
EU leaders agreed to set up "hotspots" - special processing centres on frontline countries to help screen the new arrivals.
"The measures we have agreed today will not end the crisis. But they are all necessary steps in the right direction,'' Mr Tusk said at the end of the seven-hour meeting.
A further summit is scheduled for October, with Mr Tusk and Mr Juncker also due to hold talks with Turkish President Recep Tayyip Erdogan.
Also at the conference, German Chancellor Angela Merkel said Syrian President Bashar al-Assad should be involved in talks aimed at ending his country's civil war, amid fresh diplomatic activity over the conflict.
Europe has seen thousands of migrants arrive every day, most doing so via risky boats from Turkey to Greece.
Many hope to reach Germany, travelling overland through the Balkans.
The region has seen several flashpoints - Hungary built a razor-wire fence along its Serbian border, and is trying to complete another one separating it from Croatia.
Source: BBC