Germany has introduced temporary controls on its border with Austria to cope with the influx of migrants and refugees, the interior minister has said.
Thomas de Maiziere said refugees could "not choose" their host countries and called on other European Union states to do more.
Trains between Germany and Austria were suspended for 12 hours, until 3am GMT on Monday (2pm NZT).
Germany's vice-chancellor said the country was "at the limit of its capabilities" as more than 13,000 migrants and refugees arrived in Munich on Saturday.
Germany expects 800,000 migrants and refugees to arrive this year.
"The aim of these measures is to limit the current inflows to Germany and to return to orderly procedures when people enter the country," Mr de Maiziere told a news conference.
He gave no details. The move goes against the principle of the Schengen zone, which allows free movement between many European countries. However, the agreement does allow for temporary suspensions.
Politically this is a shrewd move by Mr de Maiziere. His announcement comes just a day before he travels to Brussels to meet other EU interior ministers to discuss the migrant crisis. The measure will help him put pressure on other European countries to do their bit. It highlights just how much Germany is struggling to cope.
The move could also serve as a useful threat; after all, Mr de Maiziere said Germany was controlling the border with Austria "first", the implication being more could follow. The possibility that Germany might suddenly decide to control its other borders could well help jolt EU partners into action.
For migrants, the announcement means Germany is not pursuing an open-door policy. After weeks of confusion, Berlin is now sending out the clear message that the Dublin Regulation does still hold, meaning that people have to apply for asylum in the first EU country they arrive in. After that, if Berlin gets its way, they will then be sent elsewhere in Europe according to a strict quota system.
Many migrants have been refusing to register in countries such as Greece or Hungary, fearing it will stop them being granted asylum in Germany or other EU states.
The city of Munich, in the German state of Bavaria, has taken the brunt of arrivals over the weekend.
Bavarian Premier Horst Seehofer said the controls sent an "important signal".
Hungarian Prime Minister Viktor Orban, who has taken a tough line on the migrant crisis, told Germany's Bild newspaper he welcomed the new controls, saying they were "necessary to protect German and European values".
On Sunday, the Czech Republic also said it would boost border controls with Austria.
Europe as a whole is struggling to deal with an enormous influx of people, mostly from Syria but also Afghanistan, Eritrea and other countries, fleeing violence and poverty.
On Sunday, Greek coastguards said at least 34 people, including 11 children, drowned when a boat carrying about 100 migrants capsized off the island of Farmakonisi in the southern Aegean Sea.
The BBC's Lyse Doucet in Greece said it is the largest loss of life in a single incident in the Aegean since the crisis began.