One Iranian man, declaring a hunger strike, stripped to the waist and sewed his lips together in front of riot police

* Only Syrians, Iraqis, Afghans granted passage across Balkans

* Others deemed "economic migrants" on basis of nationality

* Rights groups increasingly concerned with winter approaching

By Yannis Behrakis

IDOMENI, Greece, Nov 23 (Reuters) - Moroccans, Iranians and Pakistanis on Greece's northern border with Macedonia blocked rail traffic and demanded passage to western Europe on Monday, stranded by a policy of filtering migrants in the Balkans that has raised human rights concerns.

One Iranian man, declaring a hunger strike, stripped to the waist, sewed his lips together with nylon and sat down in front of lines of Macedonian riot police.

Asked by Reuters where he wanted to go, the man, a 34-year-old electrical engineer named Hamid, said: "To any free country in the world. I cannot go back. I will be hanged."

Hundreds of thousands of migrants, many of them Syrians fleeing war, have made the trek across the Balkan peninsula having arrived by boat and dinghy to Greece from Turkey, heading for the more affluent countries of northern and western Europe, mainly Germany and Sweden.

Last week, however, Slovenia, a member of Europe's Schengen zone of passport-free travel, declared it would only grant passage to those fleeing conflict in Syria, Iraq and Afghanistan, and that all others deemed "economic migrants" would be sent back.

That prompted others on the route -- Croatia, Serbia and Macedonia -- to do the same, leaving growing numbers stranded in tents and around camp fires on Balkan borders with winter approaching.

Rights groups have questioned the policy, warning asylum should be granted on merit, not on the basis of nationality.

"To classify a whole nation as economic migrants is not a principle recognised in international law," said Rados Djurovic, director of the Belgrade-based Asylum Protection Centre. "We risk violating human rights and asylum law," he told Serbian state television.

The new measure coincides with rising concern, particularly on the political right in Europe, over the security risk of the chaotic and often unchecked flow of humanity into Europe in the aftermath of the Nov. 13 attacks in Paris by Islamist militants in which 130 people died.

It has emerged that two suicide bombers involved in the attacks took the same trail, arriving by boat in Greece and then travelling north across the Balkans. Most of the attackers, however, were citizens of France or Belgium.

On the Macedonian-Greek border, crowds of Moroccans, Iranians and others blocked the railway line running between the two countries, halting at least one train that tried to cross, a Reuters photographer said.

A group of Bangladeshis had stripped to the waist and written slogans on their chests in red paint. "Shoot us, we never go back," read one. "Shoot us or save us," read another.

(Additional reporting and writing by Matt Robinson; Editing by Janet Lawrence)

Our Standards: The Thomson Reuters Trust Principles.