By Alastair Macdonald and Jonny Hogg
BRUSSELS/ANKARA (Reuters) - European and Turkish officials are working to smooth out their remaining differences on an agreement to help stem flows of migrants to Europe, which they hope will be signed on Sunday by European Union leaders and Turkey's prime minister.
Turkish President Tayyip Erdogan broadly accepted a proposed action plan last month, under which the EU would provide 3 billion euros ($3.2 billion) in aid for the 2.3 million Syrian refugees in Turkey. It will also "re-energize" talks on Ankara's joining the bloc and ease visas for Turks visiting Europe.
But diplomats and officials said on Friday that differences remained on just what Turkey would commit to do in return - and when - to prevent migrants from making the short but risky crossing to Greek islands and to accept the return of people who reach the EU but fail to qualify for asylum.
German Chancellor Angela Merkel, a driving force behind seeking Turkish help in easing the refugee crisis, has faced criticism from EU allies for encouraging Erdogan to increase his demands. A senior German official stressed on Friday that Ankara also had much to gain from greater cooperation.
Bolstered by the victory of his AK party in a parliamentary election early this month, Erdogan re-appointed Prime Minister Ahmet Davutoglu and, EU officials and diplomats say, Turkey is now driving a hard bargain -- notably seeking 3 billion euros per year instead of the EU offer of the same amount over two.
"There are things that can still go wrong. It's not a simple negotiation. Among the 28 member states, there are different sensibilities about Turkey, then with Turkey itself a dialogue needs to be found," a senior EU official said on Friday. "It’s always possible there won’t be an agreement."
A diplomat in Ankara said: "Turkey is pushing its luck. They're asking for a lot and the atmospherics aren't good.
"At the same time, there are a lot of important actors within Europe that have a soft spot for Turkey and really want to find ways of taking the relationship forward."
EU officials said the final agreement would probably leave ambiguous the period over which the 3 billion euros was offered. They expect it to set conditions that would let EU leaders say they might pay less and Turkey say it might get more.
EU governments have also not agreed how to fund the facility. Some favor use of a debit facility from the central EU budget rather than individual states sending funds to Turkey.
Merkel, whose willingness to take nearly a million refugees this summer has put her under huge political pressure at home, broke with protocol to visit Erdogan before the election. She has pressed the other 27 EU leaders to come for what is intended to be a formal, three-hour summit to sign a prepared text.
Critics fear Merkel has given Erdogan too great a sense that Europeans are desperate and that he can drive the hardest of bargains.
After many EU leaders got the impression Erdogan would take up an invitation to a summit himself, EU officials said the fact Davutoglu was coming was in line with diplomatic protocol.
However, the Ankara diplomat said it also may also reflect a degree of brinkmanship by Turkey: "Why is Davutoglu going rather than Erdogan?" he said. "It shows that the Turks are prepared to let it fail. It’s a good negotiating tactic but a bad sign.”
EU officials said they did not expect leaders to raise human rights issues with Davutoglu on Sunday, despite new concerns over the arrest this week of two Turkish journalists. Activists complained about the extent to which the EU appears to be muting such considerations in return for help with migration.
Ankara's confrontation with Moscow after shooting down a Russian warplane this week on the Syrian border may come up on the sidelines. Europeans have backed their NATO ally, but diplomats say some feel Turkish action was overly aggressive.
At the same time, one senior EU official suggested that the turmoil in Syria and tensions with Russia could increase a sense in the Turkish government that it needs better ties with Europe.
(Additional reporting by Paul Taylor in Brussels, Jonny Hogg in Ankara and Karolina Tagaris in Athens and Noah Barkin in Berlin; Writing by Alastair Macdonald, editing by Larry King)