Lithuania has been ordered not to push back five Afghan refugees who are stranded at the country's border with Belarus.
The European Court of Human Rights has said the refugees should not be removed from the country, as they are already in hiding in Lithuania.
The Afghan nationals had arrived in Belarus in August and have been repeatedly attempting to reach Lithuania, the court said.
Lithuania, and other EU member states, have accused Minsk of encouraging migrants to illegally cross the border to destabilise the bloc.
The dispute has left a number of people stranded at the EU's external borders, as Belarus also refuses to readmit them.
Five Afghan refugees had applied to the European Court of Human Rights over the issue, claiming that they had been in hiding in Lithuania since 5 September.
But the Lithuanian State Border Guard Service has said that the group have not entered the country's territory.
In its judgment on Wednesday, the Strasbourg court said that the group had been "seeking international protection".
The applicants had claimed that they were "westernised and educated" and were particularly vulnerable following the Taliban takeover of Afghanistan.
And the European court agreed that the Lithuanian government should not remove them to Belarus "provided that they are already on Lithuanian territory".
The interim measure, which is valid until the end of September, could also apply in the future to other Afghan refugees who are stranded between the EU and Belarus.
The UN migration agency has said it is concerned by "dire conditions" facing some migrants who have been stranded for weeks at the border between Poland and Belarus.