BERLIN For months, Germany's Angela Merkel has pleaded with her critics, at home and abroad, to give her just a little more time to forge a common European response to the refugee crisis.
On Friday, she got just that: a reprieve in the form of a far-reaching cooperation deal between the European Union and Turkey which, if successful, could turn the chaotic flood of migrants onto Europe's southern shores into an orderly, manageable stream.
"Today shows that Europe will manage it," she told a news conference. "It shows we are capable of reaching common European solutions and managing complex tasks."
But in winning the backing of sceptical EU partners for the agreement, the German chancellor may also have expended some of the last political capital left after her months-long struggle to avert a Europe of closed borders, fences and walls.
The agreement, hammered out between EU leaders and Turkish Prime Minister Ahmet Davutoglu in Brussels, is highly complex and will only deliver on its promise if the EU, Turkey and Greece can overcome years of mistrust and work in lockstep in the weeks ahead.
It foresees Ankara taking back all illegal migrants who make it across the Aegean Sea to Greece. In return, the EU would take on an equal number of Syrian refugees directly from Turkey and give the Turks billions of euros in new funds, visa-free travel rights and accelerated EU membership negotiations.
In the longer run, it hinges on European states agreeing to accept quotas of refugees from Turkey, something Germany's European partners have shown little appetite for, despite optimistic talk from Berlin about a "coalition of the willing".
So although the deal represents a triumph of sorts for Merkel, who pushed it through by sheer force of will in a testament to her enduring influence in Brussels, it is a victory that could easily blow up in her face.
"Let me be clear that I don't have any illusions about what we agreed today," Merkel said at the end of the two-day EU summit. "There will be setbacks. There are big logistical challenges that we need to overcome."
The deal comes at a time when patience with Merkel's refugee strategy is wearing thin in European capitals as well as towns and cities across Germany.
Half a year ago she agreed to suspend EU rules and open German borders to thousands of migrants camped out in Hungary, telling sceptical countrymen that Germany was strong enough to handle the influx.
Her moral stance won praise at home and abroad. But Germany's "Willkommenskultur", or welcoming culture, has since faded, with doubts growing after a spate of sexual assaults on women in Cologne on New Year's Eve that police blamed on foreigners.
Merkel's popularity has also taken a hit as she rebuffed calls to impose a formal cap on the number of migrants entering Germany and condemned countries along the Balkan route from Greece that shut their borders, leaving thousands stranded.
Strong gains for the anti-immigration Alternative for Germany (AfD) party in three German state elections last Sunday stunned her conservative party. That increased pressure on the 61-year-old German leader, who celebrated a decade in office last November, to bed down the deal with Davutoglu, the outlines of which she sprung on surprised EU partners earlier this month.
Opinion polls show that many Germans, even if they are willing to give the deal a chance, are deeply sceptical it can work. A survey for public broadcaster ZDF on Friday showed that 79 percent of Germans doubt whether Turkey can be relied upon to hold up its end of the bargain.
Like her abrupt decision to phase out nuclear energy in 2011, betting on Turkey represents a major reversal for Merkel, who has long opposed Ankara's bid to join the EU and has had a rocky relationship with President Tayyip Erdogan for years.
"I don't know how this Turkey deal will work," said a senior lawmaker from Merkel's Christian Democrats (CDU), who requested anonymity because of a reluctance to criticise the chancellor publicly. "The other states are not on our side. That is our problem. They feel duped by Germany."
At home, Merkel's Bavarian allies, the Christian Social Union (CSU), are now waging an open war of words against her.
On Friday, Hans-Peter Friedrich, a leading CSU lawmaker and former interior minister, called on Twitter for all CDU members who sympathised with Merkel's refugee policies to leave her party and join the left-leaning Social Democrats and Greens.
The deal with Turkey is unlikely to silence the CSU critics.
But the shutting of borders along the Balkan route from Greece to central Europe has slowed the flood of migrants entering Germany to a trickle, buying her time to try to make Friday's agreement work.
Perhaps reflecting the recent drop in arrivals, the ZDF poll showed that 53 percent of Germans approved of her refugee policy, up from 47 percent the month before. Merkel's own popularity rating also bounced back in the survey.
But as German newspaper Die Zeit wrote this week, her room for manoeuvre is getting ever smaller.
"The longer Merkel sticks to her stance, the more compromises she has to make ... and the bigger the questions and contradictions surrounding her policies become," the weekly wrote.
(Additional reporting by Paul Carrel; Writing by Noah Barkin; Editing by Paul Taylor and Pravin Char)
This story has not been edited by Firstpost staff and is generated by auto-feed.