Slovenia said it was ready to provide immediate shelter and humanitarian care for 5,000 refugees but the country’s police detained 150 people who had crossed from Croatia by train and threatened to send them back.

Slovenia later stopped all passenger services on the main line from Croatia through the border point. The train carrying the people had been halted at Dobova railway station on the Slovenian side of the border and police stepped up checks near the town, using a helicopter as well as foot patrols.

“We will return them [the refugees] to Croatia in the shortest time possible,” said Anton Stubljar of Novo Mesto police.

Earlier in the day, the Slovenian ambassador to the UK, Tadej Rupel, had said the country could shelter 2,000 refugees in buildings such as sports centres and 3,000 in tented camps around the country. He said the contingency plans were being updated daily.

Rupel said: “What we are emphasising is that refugees and migrants need protection, our solidarity, compassion and respect. We are ready and committed to all the humanitarian needs of those who are migrating and for refugees.

“We are tackling various aspects: security for the local population as well as for the refugees, the health aspect – we will have basic healthcare checks for migrants and urgent medical treatment – and we are of course paying a lot of attention to the vulnerable elements in the groups, who are the children, the older people and the patients, and youngsters without parents,” Rupel said.

Croatian authorities say 7,000 people have crossed the border from Serbia in the past two days. They are attempting to make their way westwards, and many are expected to make for the Slovenian border.

Rupel said his country’s mountainous 415-mile frontier with Croatia was impossible to seal, and Slovenia would seek to ensure all those crossing into the country were cared for in reception centres and camps.

The ambassador said the arrivals would have the option of applying for asylum. “If they are registered as asylum seekers they have a right to go through all the integration process, which brings education in the language and help in getting a job,” he said.

As part of an EU agreement, Slovenia has said it could integrate 861 long-term refugees, but those places have largely been taken by refugees due to be transferred from camps in Greece, Italy and Macedonia. The ambassador said the number Slovenia could integrate was under continual review.

As for those refugees who want to keep travelling westwards and northwards elsewhere in Europe, he said the Slovenian state had no right to stop them. “There are not locked, or behind bars,” Rupel said. “They are free to move.”

As for those refugees who did not want to register in Slovenia, he said they would not be stopped from leaving refugee centres. “They are not locked, or behind bars,” Rupel said. “They are free to move.”

In a later clarification, he said that freedom of movement applied only inside Slovenia. If unregistered refugees attempted to cross into other countries, they could be detained for not carrying travel documents.

Acknowledging that Slovenia could face an influx of refugees far above the capacity of its reception centres, Rupel said: “We are direct contact with our neighbouring countries, and we can discuss how this can be arranged if there is a specific number of refugees who want to move on.

“The problem won’t be settled soon, so we need to address the problem and find some kind of comprehensive solution, not just on the EU basis but also on the international level. It should be a sympathetic response based on humanitarian principles and it should be a collective response.”

