Facing an unstaunchable flood of migrants and refugees, Germany on Sunday said it was reaching a breaking point and would implement emergency controls on its border with Austria, temporarily suspending train service and conducting highway checks along the main pipeline for thousands seeking sanctuary in Western Europe.

The move signaled the extent of the crisis confronting Europe, a region where a decades-long policy of open borders, once a source of pride and unity, is eroding as nations struggle to cope with a record flow of migrants. Only last week, Denmark temporarily closed a highway and suspended trains on its southern border with Germany, and French authorities have searched for migrants on trains crossing from Italy.

Yet even as Germany moved to restore “order” to the chaotic inflow, the death toll continued to jump. Off a Greek island on Sunday, 34 refugees, including four infants and 11 boys and girls, drowned when their wooden boat overturned and sank. It appeared to mark the worst loss of life in those waters since the migrant crisis began.

Berlin says the emergency on its southeastern border is a question of national security. Germany has thus far stepped in to take in the most asylum seekers of any European Union nation, but its ability to aid refugees is being tested amid a record surge of 40,000 migrants over the weekend — from Syria, Iraq, Afghanistan and Pakistan, among other countries. Officials in the overwhelmed state of Bavaria, for instance, declared they have run out of space to house refugees.

Coupled with an expected move by Hungary on Tuesday to reinforce its southern border with Serbia, the German action suggested that migrants may now face tougher barriers as they seek safety and hope.

“The aim of this measure is to restrict the current flow to Germany and to return to an orderly procedure of immigration,” German Interior Minister Thomas de Maizière said Sunday. He implied that many asylum seekers were trying to reach Germany because of its generous refugee benefits and seemed to fault other European nations for not stepping up to do more: “Asylum seekers have to accept that they cannot just choose the member state of the European Union granting them protection.”

In Germany, the new measures were already taking force. The German state-owned railway company Deutsche Bahn announced that train traffic from Austria to Germany would be suspended until 5 a.m. Monday. Bavarian officials said checks were starting on highways linking Austria to Germany, while the German Federal Police said that “all available units” were being rapidly dispatched to the border to help carry out checks.

At the main train station in Vienna, hundreds of desperate asylum seekers were camped out and waiting for word on whether and how they could move on. Austrian authorities were telling them to board buses to overnight shelters, but many refused for fear they would miss their chance to leave in the morning for Germany.

“We came all this way because we want to live in Germany, and were so happy when we reached Austria, because in Hungary we were treated so badly, and now we have the message that the trains have been stopped,” said Kamal, 50, an Iraqi from Basra traveling with five other men. He declined to give his last name to protect his family back home.

Ivo Priebe, spokesman for the German Federal Police, said he was not aware of any bottlenecks due to the new controls. He said that not every car would be checked but that officers would conduct stop-and-search patrols on highways, roads and at railway crossings. Several hundred police officers had been sent into the border region by car and by helicopter earlier Sunday, he said.

“We know the paths they are using and will carry out increased controls there,” he said. He did not know how long the checks would be in place, he said, calling them the result of a “political decision.”

Indeed, the move highlighted the backlash brewing against the open-arms policy on asylum seekers taken by Chancellor Angela Merkel. Within her ruling coalition, many are still smarting over her recent decision to allow in tens of thousands of refugees stranded in Hungary. As Germany struggles to cope — turning army barracks, schools and former hardware stores into impromptu shelters — some politicians have called Merkel’s decision into serious question, arguing that the nation cannot provide sanctuary to all.

On Sunday, Bavarian Interior Minister Joachim Herrmann said at a news conference in Munich that cars would be monitored at the border in order to capture human traffickers and allow refugees to request asylum upon being stopped. But he said those who had already applied for asylum elsewhere in the E.U. — for instance, in Hungary or Austria — would be sent back to those countries in accordance with European laws.

“Unchecked immigration on the scale of the past days constitutes a serious threat for the public safety and order in Germany,” said Herrmann, a member of the Christian Social Union, sister party of Merkel’s Christian Democratic Union (CDU).

Depending on how long the stricter German border measures last, the decision could potentially spark new bottlenecks in Austria that could ripple into Hungary as well as other countries transited by those fleeing conflict and poverty.

The German decision amounted to the latest blow against open borders in Europe, a policy dating back to the 1985 Schengen Agreement that today allows free movement across 26 nations. Assuming the new German checks are limited in duration, they would not violate the agreement, which allows nations to institute border restrictions under certain circumstances.

Germany, for instance, has set aside the agreement in the past for major international summits, and Belgium did so in 2000 during a major European soccer tournament, said Pieter Cleppe, head of the Brussels office of Open Europe, a regional think tank.

The open-borders treaty, he said, is not in immediate danger. But, he warned, “if temporary closures start becoming a de facto permanent set of border controls, we may be seeing the end of Schengen.”

The 28-nation E.U. is deeply divided over a plan backed by Germany and France to issue new migrant quotas to all nations. De Maizière on Sunday said Germany, which is expecting 800,000 asylum applications this year, could not shoulder the burden alone.

“The German readiness to help must not be overstretched,” he said. “The measure therefore is also a signal to Europe.”

E.U. interior ministers are meeting Monday in Brussels to discuss the disputed proposal for quotas and other regional efforts to contain the crisis.

Migrants and refugees continued to stream into Hungary over the weekend, as thousands of families from the Middle East and Africa tried to reach Europe before Hungarian authorities initiate a crackdown next week.

Meanwhile, governments continued to bicker about how to cope with the influx.

Austrian Chancellor Werner Faymann, in an interview with German news magazine Der Spiegel, compared Hungarian Prime Minister Viktor Orban’s treatment of refugees to the Nazis’ deportation of Jews.

“Sticking refugees in trains and sending them somewhere completely different to where they think they’re going reminds us of the darkest chapter of our continent’s history,” he said.

Hungary’s foreign minister retorted that such comments were “totally unworthy of any leading 21st-century European politician” and counterproductive to solving the crisis, according to the Associated Press.

Samuels reported from Budapest. Souad Mekhennet in Vienna and Stephanie Kirchner in Berlin contributed to this report.

The Arab world’s wealthiest nations are doing next to nothing for Syria’s refugees

New exodus: A global surge in migration

Today’s coverage from Post correspondents around the world