Thousands of rain-soaked migrants remain trapped in a no man's land between Greece and Macedonia as Macedonian police continue to block the frontier, preventing them from heading north to the European Union.

Overnight, police let only small groups of families with children cross the border by walking to a railway station in the Macedonian town of Gevgelija, where most take trains to the border with Serbia before heading toward EU-member Hungary.

Those who could not cross, including many women and children, spent the rainy and chilly night in the open.

Police fired stun grenades and clashed with the migrants who tried to rush over the border on Friday, a day after Macedonia's government declared a state of emergency on the frontier to stop the human tide.