EU leaders at a summit in Brussels have agreed on an "action plan" with Turkish President Tayyipd Erdogan to cooperate on improving the lives of two million Syrian refugees in Turkey and encouraging them to stay put.

The European Union has offered Turkey a possible €3 billion (£2.21bn) in aid and the prospect of easier travel visas and “re-energised” talks on joining the bloc in return for its help stemming the flow of people to Europe.

They also agreed to coordinate border controls to slow the influx of refugees and migrants crossing Turkey from Asia.

Though the plan put no figure on "substantial and concrete new funds" the EU would offer, German Chancellor Angela Merkel said the figure of €3 billion, which EU officials said Ankara had requested, had been discussed and seem reasonable.

"Our intensified meetings with Turkish leaders ... in the last couple of weeks were devoted to one goal: stemming the migratory flows that go via Turkey to the EU. The action plan is a major step in this direction," said summit chairman Donald Tusk, expressing "cautious optimism".

In formal conclusions agreed by the 28 national leaders at a meeting that ended after midnight, Turkey was offered an accelerated path to giving its citizens visa-free travel to the EU, provided it met previously agreed conditions.

Our intensified meetings with Turkish leaders ... in the last couple of weeks were devoted to one goal: stemming the migratory flows that go via Turkey to the EU <p>Donald Tusk</p>

Progress would also depend on Ankara showing real help in slowing migration and would be reviewed next spring.

Ms Merkel, who will visit Istanbul for talks with Erdogan on Sunday in a political gesture two weeks before a Turkish general election, said it was clear that Europe's efforts to filter and process refugees would not work without Turkey's cooperation.

“The hotspots alone won't solve the problem,” she said.

Refugee crisis - in pictures Show all 27 1 /27 Refugee crisis - in pictures Refugee crisis - in pictures A child looks through the fence at the Moria detention camp for migrants and refugees at the island of Lesbos on May 24, 2016. AFP/Getty Images Refugee crisis - in pictures Ahmad Zarour, 32, from Syria, reacts after his rescue by MOAS (Migrant Offshore Aid Station) while attempting to reach the Greek island of Agathonisi, Dodecanese, southeastern Agean Sea Refugee crisis - in pictures Syrian migrants holding life vests gather onto a pebble beach in the Yesil liman district of Canakkale, northwestern Turkey, after being stopped by Turkish police in their attempt to reach the Greek island of Lesbos on 29 January 2016. Getty Images Refugee crisis - in pictures Refugees flash the 'V for victory' sign during a demonstration as they block the Greek-Macedonian border Refugee crisis - in pictures Migrants have been braving sub zero temperatures as they cross the border from Macedonia into Serbia. Refugee crisis - in pictures A sinking boat is seen behind a Turkish gendarme off the coast of Canakkale's Bademli district on January 30, 2016. At least 33 migrants drowned on January 30 when their boat sank in the Aegean Sea while trying to cross from Turkey to Greece. Getty Images Refugee crisis - in pictures A general view of a shelter for migrants inside a hangar of the former Tempelhof airport in Berlin, Germany Refugee crisis - in pictures Refugees protest behind a fence against restrictions limiting passage at the Greek-Macedonian border, near Gevgelija. Since last week, Macedonia has restricted passage to northern Europe to only Syrians, Iraqis and Afghans who are considered war refugees. All other nationalities are deemed economic migrants and told to turn back. Macedonia has finished building a fence on its frontier with Greece becoming the latest country in Europe to build a border barrier aimed at checking the flow of refugees Refugee crisis - in pictures A father and his child wait after being caught by Turkish gendarme on 27 January 2016 at Canakkale's Kucukkuyu district Refugee crisis - in pictures Migrants make hand signals as they arrive into the southern Spanish port of Malaga on 27 January, 2016 after an inflatable boat carrying 55 Africans, seven of them women and six chidren, was rescued by the Spanish coast guard off the Spanish coast. Refugee crisis - in pictures A refugee holds two children as dozens arrive on an overcrowded boat on the Greek island of Lesbos Refugee crisis - in pictures A child, covered by emergency blankets, reacts as she arrives, with other refugees and migrants, on the Greek island of Lesbos, At least five migrants including three children, died after four boats sank between Turkey and Greece, as rescue workers searched the sea for dozens more, the Greek coastguard said Refugee crisis - in pictures Migrants wait under outside the Moria registration camp on the Lesbos. Over 400,000 people have landed on Greek islands from neighbouring Turkey since the beginning of the year Refugee crisis - in pictures The bodies of Christian refugees are buried separately from Muslim refugees at the Agios Panteleimonas cemetery in Mytilene, Lesbos Refugee crisis - in pictures Macedonian police officers control a crowd of refugees as they prepare to enter a camp after crossing the Greek border into Macedonia near Gevgelija Getty Images Refugee crisis - in pictures A refugee tries to force the entry to a camp as Macedonian police officers control a crowd after crossing the Greek border into Macedonia near Gevgelija Getty Images Refugee crisis - in pictures Refugees are seen aboard a Turkish fishing boat as they arrive on the Greek island of Lesbos after crossing a part of the Aegean Sea from the Turkish coast to Lesbos Reuters Refugee crisis - in pictures An elderly woman sings a lullaby to baby on a beach after arriving with other refugees on the Greek island of Lesbos after crossing the Aegean sea from Turkey Getty Images Refugee crisis - in pictures A man collapses as refugees make land from an overloaded rubber dinghy after crossing the Aegean see from Turkey, at the island of Lesbos EPA Refugee crisis - in pictures A girl reacts as refugees arrive by boat on the Greek island of Lesbos after crossing the Aegean sea from Turkey Getty Images Refugee crisis - in pictures Refugees make a show of hands as they queue after crossing the Greek border into Macedonia near Gevgelija Getty Images Refugee crisis - in pictures People help a wheelchair user board a train with others, heading towards Serbia, at the transit camp for refugees near the southern Macedonian town of Gevgelija AP Refugee crisis - in pictures Refugees board a train, after crossing the Greek-Macedonian border, near Gevgelija. Macedonia is a key transit country in the Balkans migration route into the EU, with thousands of asylum seekers - many of them from Syria, Afghanistan, Iraq and Somalia - entering the country every day Getty Images Refugee crisis - in pictures An aerial picture shows the "New Jungle" refugee camp where some 3,500 people live while they attempt to enter Britain, near the port of Calais, northern France Getty Images Refugee crisis - in pictures A Syrian girl reacts as she helped by a volunteer upon her arrival from Turkey on the Greek island of Lesbos, after having crossed the Aegean Sea EPA Refugee crisis - in pictures Refugees arrive by boat on the Greek island of Lesbos after crossing the Aegean sea from Turkey Getty Images Refugee crisis - in pictures Beds ready for use for migrants and refugees are prepared at a processing center on January 27, 2016 in Passau, Germany. The flow of migrants arriving in Passau has dropped to between 500 and 1,000 per day, down significantly from last November, when in the same region up to 6,000 migrants were arriving daily.

French President Francois Hollande stressed that Turks would not be getting visas on easier terms. One condition still to be met is for Ankara to first stop granting such easy entry to Pakistanis, Afghans and others who end up heading to Europe.

It must also first sign and implement a previously agreed deal to take back from Europe migrants who fail to win refugee status. “There must be no misunderstandings,” Mr Hollande said.

European governments are wary of granting full visa-free access to 78 million Turks. Any liberalisation is likely to be limited at first to business travellers and students.

Leaders also agreed to “re-energise” moribund, decade-old negotiations on Turkey's application for membership of the European bloc, though they left open exactly how to do that.

“The accession process needs to be re-energised with a view to achieving progress in the negotiations in accordance with the negotiating framework and the relevant Council conclusions,” they said, in language couched cautiously to reflect concerns in Cyprus and other states about easing off pressure on Ankara.

Earlier, at talks in Ankara with a delegation from the executive European Commission, Turkish ministers had asked the EU to start easing restrictions for some Turks travelling to the EU by the middle of next year, EU officials said.

Thousands of migrants pour into Austria

EU sources said they sought Our intensified meetings with Turkish leaders ... in the last couple of weeks were devoted to one goal: stemming the migratory flows that go via Turkey to the €3 billion in new financial aid and the opening of six so-called chapters of the accession process, concerning harmonising rules in energy, justice and economic and monetary affairs among others.

Turkey was also seeking more high-level political dialogue with invitations for Mr Erdogan to summits after an ice-breaking visit he made to Brussels earlier this month.

The bulk of the written agreements approved by the leaders concerned measures the EU is in the course of putting in place to deal with the crisis caused by the arrival of hundreds of thousands of people in the biggest migration movement the continent has seen since World War Two.

After a summer of bitter arguments among leaders on how to share responsibility for accommodating refugees, the focus has turned to aid for neighbouring states to reduce pressure to leave and on bolstering border controls, speeding up the deportation of failed asylum-seekers and on a possible EU frontier force.

However, leaders had what Ms Merkel called a long and serious talk about the possibility of reforming the EU asylum system by going beyond pilot schemes to create a permanent mechanism to relocate asylum claimants around the EU by national quotas.

Ms Merkel, who has taken a lead in welcoming Syrian refugees but is now under domestic political pressure to ensure Germany does not house the bulk of new arrivals, said there was still much work to do to forge a consensus on distribution.

Pushing back against ex-communist states that do not want large numbers of immigrants, she said: “In the end we are all Europeans, and this refugee question will challenge all of us.”

Turkey wants to be put on a list of “safe countries”, whose nationals would not normally be granted asylum in Europe. The issue was not discussed at the summit. Germany is concerned about Turkish Kurds who might seek refuge in Europe. EU officials stress that all asylum claims will still be assessed.

Embracing Turkey and especially Mr Erdogan, who critics see as increasingly authoritarian, poses dilemmas for EU leaders.

But the EU's political priority has changed: “In our neighbourhood, we are not asking any more for fundamental rights after the Arab Spring,” said a senior EU political leader. “We are asking for stability.”

Many doubt whether such a populous, mostly Muslim country can ever join the Union. Yet the EU is desperate for help.

Efforts to end the division of Cyprus between the Greek-speaking state that is an EU member and the Turkish-backed one in the north of the island are also a factor. EU diplomats worry that Erdogan may use the migration crisis as added leverage.

“We understand the added value of Turkey,” one said. “But we cannot give it carte blanche.”

Adding to uncertainties in negotiating any deal with Turkey is the turmoil that followed a bombing Ankara blames on either Kurds or Syria-based Islamists, as well as a snap parliamentary election on Nov. 1 that will determine Erdogan's future powers.