BERLIN — Facing an unstaunchable flood of migrants, 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 decadeslong 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 mount. Off a Greek island 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 taken 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 besieged state of Bavaria 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 migrants 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.

Ivo Priebe, spokesman for the German Federal Police, said he was not aware of any bottlenecks caused by 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 railway crossings. Several hundred police officers had been sent into the border region by car and 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.”