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.
What the EU leaders agreed
- At least €1bn (£700m, $1.1bn) extra will be donated to the UN refugee agency and the World Food programme
- More help for Lebanon, Jordan, Turkey and other countries
- Greater co-operation and dialogue with Turkey
- Assistance for Balkan states, who have become a major route for migrants travelling north
- Strengthened border controls, including more funding for border security forces
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.
European leaders react
Germany, the favoured destination for many of Europe's new arrivals, was "satisfied" by the meeting. Chancellor Angela Merkel said: "I got the feeling that we want to tackle this task together."
Italy is one of the main gateways for migrants entering Europe. Prime Minister Matteo Renzi said EU leaders had in effect ended the Dublin principle, which says migrants must claim asylum in the first EU country they enter.
France called for an international conference on refugees, with President Francois Hollande singling out the US and Canada for having to "do their bit".
Hungary, one of the most hard-line countries, wanted collective European action to defend Greece's borders. Prime Minister Viktor Orban was disappointed, saying "Europe's external border is still not defended".
Croatia has become a key route north for migrants. Croatian Prime Minister Zoran Milanovic said he asked for the "utmost" to be done to control sea routes between Greece and Turkey.
"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.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.