Border controls were returning to Europe last night (Sunday) as the Continent struggles to cope with the worst refugee crisis since the Second World War.
As city after city across Germany announced it had no more room for the tens of thousands of refugees pouring into the country, and the mayor of Munich warned that new arrivals would soon be sleeping in the streets, Chancellor Angela Merkel's government announced it was reimposing controls on its border with Austria.
All train services between the two countries were stopped at 5pm, and more than 2,000 riot police were being sent to secure the border after local officials issued a plea for more help from the federal force.
"The aim of this measure is to limit the current flow to Germany and restore an orderly process," Thomas de Maiziere, the interior minister, said.
Soon afterwards, the Czech Republic said it was imposing similar measures along its border with Austria.
The announcement in Berlin signalled a dramatic shift in policy by Mrs Merkel's government. Just a week ago, there were emotional scenes in Munich as hundreds of local people turned out to cheer arriving refugees after Germany announced it would let them in to avert a humanitarian crisis.
But last night Mr de Maiziere said: "Germany has shown great willingness to help, but this willingness should not be overstretched. The burden of such a large number of refugees must be shared fairly around Europe."
The European Commission said Germany appeared to be legally justified in reimposing the border controls, allowed as a temporary emergency measure under the Schengen Agreement.
EU interior ministers meeting in Brussels today will discuss a proposal by Jean-Claude Juncker, the commission president, to redistribute 160,000 refugees among member states. Britain will not have to take any refugees under the scheme, as it has an opt-out.
The crisis has exposed huge cracks in the current EU system, under which migrants must seek asylum in the country in which they first arrive.
Governments have descended into sparring over responsibility for the new arrivals, with neighbours accusing each other of failing to register migrants and shunting them on to the next destination. Others complain of unfairly large burdens, or argue that they cannot intercept migrants bent on reaching the country of their choice.
But Mr de Maiziere said that until a new system was in place, member states would have to follow the rules, registering asylum-seekers and carrying out the "asylum procedure".
Most refugees want to go to Germany or Sweden, where they get a warmer welcome and more generous benefits.
The apparent U-turn by Mrs Merkel's government came after the authorities in Munich, the entry point for most migrants in Germany, appealed for help to cope with the influx. "We are simply full," Dieter Reiter, the mayor, said after 12,000 migrants arrived on Saturday - the most yet in a single day. "I can no longer ensure that refugees do not have to sleep at the station, or elsewhere in the city under the open sky."
There was no sign of a let-up in the numbers heading north towards Germany. The Austrian authorities said 6,700 arrived across the border with Hungary on Saturday, and they were expecting up to 8,000 more yesterday.
Further south along the route, 4,330 refugees crossed into Hungary on Saturday, the most the country has seen in a single day.