Germany warned Monday that the passport-free Schengen zone in Europe is in 'danger' after Sweden and Denmark introduced new border controls to stem the flow of migrants.

German Foreign Ministry spokesman Martin Schaefer said "freedom of movement is an important principle" and one of the European Union's biggest achievements.

He spoke shortly after Denmark said it would enforce temporary controls on its border with Germany. Danish Prime Minister Lars Lokke Rasmussen said that actions by other Nordic countries could lead to more asylum seekers traveling to his country.

Also Monday, Sweden imposed new restrictions, saying people entering from Denmark will have to show photo identification.

The move by Sweden is an attempt to stop the flow of undocumented migrants into the country known for its generous welfare system. The new measure means Sweden is closing its open-door migrant policy after receiving 160,000 migrants last year. Neighboring Denmark only took in 18,000.

Travelers have been warned to expect long lines on the Danish side of the Oresund Bridge, a major entry point for migrants seeking a new life in Sweden.

The re-introduction of the border controls between Sweden and Denmark means that travelers between the two Nordic countries will have to show their passports for the first time in more than 50 years.

The thousands of daily commuters between the countries will also be affected by the new measure.

Sweden is the latest European country to impose the border checks, all but erasing the idea of a borderless Europe where a traveler could pass from one country into another without showing a passport.

Europe is facing its largest refugee crisis since World War Two.

More than one million migrants, mainly from Syria, Afghanistan and Iraq, sought asylum in Europe last year, according to the United Nations refugee agency.