All train services were halted between Germany and Denmark on Wednesday after Danish police stopped hundreds of migrants arriving by train across the border, Danish railway company DSB said.

About 100 migrants who arrived from Germany refused to leave a train in the Danish port city of Roedby, police spokeswoman Anne Soe said. She said they don't want to be registered in Denmark.

"We are talking to them and trying to convince them to come out," Soe said. "Things are nice and calm. But of course some people are bit tense."

Under EU rules, people seeking asylum should do so in the first EU country they enter and not travel from one country to another.

Many of the migrants say they want to go to Sweden, Norway or Finland, because they have relatives there or believe that the conditions for asylum-seekers are better.

Danish police also closed a highway on the Jutland peninsula after about 300 migrants who had crossed the border from Germany left a school where they had been housed and started heading north on foot.

Danish officials said they had reached out to Sweden to see if the two countries could make an exception to the EU's rules and let the migrants through to Sweden since so many don't want to stay in Denmark.

But Fredrik Beijer, legal director of the Swedish Migration Agency, told The Associated Press that he saw no way to circumvent the EU rules.

Beijer said migrants and refugees entering the EU have a right to apply for asylum in the bloc "but they don't have the right to choose in which country they apply for asylum."

___

Associated Press writer Karl Ritter contributed to this report.