Denmark and Sweden tightened their borders on Monday in efforts to stem the flow of migrants entering Scandinavia from Germany.

Just hours after Swedish rules went into effect requiring train passengers travelling from Denmark to show ID, the Danish government announced it had beefed up border controls with Germany as of noon local time on Monday.

"We are introducing temporary border controls, but in a balanced way," Danish Prime Minister Lars Loekke Rasmussen told reporters in Copenhagen, adding there would be no problem for "ordinary" Danes and Germans to cross the border.

The moves were the latest by European Union countries to suspend an agreement to keep internal borders open after 1 million migrants entered the 28-nation bloc in 2015, most of them by crossing the Mediterranean to Greece or Italy.

Denmark Europe Borders Are Back

Eromo Gesahegn Abebe from Ethiopia, last living in Norway, is seen at the train station at Copenhagen International Airport, the last stop before crossing the Oresund Bridge into Sweden, in Kastrup, Denmark on Monday. Since it opened in 2000, the Oresund bridge between Sweden and Denmark has been a towering symbol of European integration and hassle-free travel across borders. (Niels Hougaard/Polfoto via Associated Press)

"If the European Union cannot protect the external border, you will see more and more countries forced to introduce temporary border controls," Loekke Rasmussen said.

He said the Danish move was in response to new ID checks introduced by Sweden on Monday for all passengers entering the country by train, bus or ferry.

"This could lead to more refugees and migrants being stopped on their journey northward, and therefore ending up with us in Denmark," the prime minister said.

His government has taken a series of measures to discourage migrants from coming to Denmark, including a proposal to seize their jewelry to cover their expenses.

Sweden took in 160K asylum-seekers in 2015

The Swedish government initially had a welcoming attitude to migrants, but reversed course after more than 160,000 Syrians, Iraqis, Afghans and others applied for asylum in 2015, the highest number in Europe except for Germany.

To comply with the new Swedish rules, passengers on Monday had to show identification to board trains departing from Copenhagen Airport to Sweden across a bridge-and-tunnel link.

Danish officials have criticized the move and suggested Sweden should pay for the cost of the ID checks.

Loekke Rasmussen called the Swedish move a "big setback" for efforts to deepen ties between Copenhagen and southern Sweden and predicted it would cause problems for commuters.

He stressed that the Danish checks on the German border wouldn't be as far-reaching. They would entail "spot checks" on passengers on trains crossing the mainland border on the Jutland peninsula and on ferries arriving in the Danish ports of Gedser and Roedby.

Checks but not 'controlling everyone'

"We are not talking about controlling everyone coming in from Germany," he said.

German officials didn't comment directly Monday on the Danish decision, but Chancellor Angela Merkel's spokesman, Steffen Seibert, said Loekke Rasmussen had spoken with the German leader.

Germany introduced border controls of its own on the Austrian frontier in mid-September and Seibert said those have been successful — "but it is clear to all of us in Europe ... that we need an overall European solution. The solution won't be found at national borders between country A and country B."

More than 190,000 migrants crossed the German-Danish border last year. About 13,000 applied for asylum in Denmark, while others traveled further north to Sweden, Norway and Finland, Loekke Ramussen said.