Hundreds of refugees stranded in Serbia have begun walking from Belgrade towards the border with Hungary to protest against its closure for most people trying to reach the European Union.

More than 6,000 people remain stuck in Serbia following Hungary’s introduction this summer of strict limits on the number of refugees allowed to cross into the EU-member country and reinforced a razorwire border fence with heavy patrols.

People hold up signs as they approach the Hungarian border in Serbia. Photograph: Marko Djurica/Reuters

The Balkan migration trail, used by nearly one million people fleeing wars and poverty last year, formally closed in March, forcing people to use alternative routes and pay smugglers to get them across.

On Tuesday, about 400 refugees chanted “open Hungary’s borders” and held banners saying “we don’t need food, water or anything, we want you to open the borders” as they marched north in a long column from Belgrade along a road leading toward the Hungarian border about 120 miles away.

Most of the refugees appeared to be young men and boys who stood little chance of getting into Hungary or other EU nations. Hankrim from Afghanistan, who gave only his first name, said he had been on the road for six months, sleeping on roads and parks. “Excuse me please, Hungarian government, please Hungary, open the border,” he said.

Serbia said on Tuesday it would not erect a wire border fence, but would deploy its army to seal off the borders with Macedonia and Bulgaria to stop refugees from coming in from those countries. “We will block the migrants the same way as the countries which did not erect the border fence,” said the Serbian president, Tomislav Nikolić.

Most of the refugees appeared to be young men and boys who stood little chance of getting into Hungary or other EU nations. Photograph: Andrej Cukic/EPA

Hungary has refused to accept any of the people the EU is trying to relocate from Italy and Greece. On Sunday voters there overwhelmingly rejected any future mandatory quotas for accepting refugees. The referendum was rendered invalid, however, because of low turnout.

Meanwhile, Romanian border police said they were investigating 16 Iraqi citizens, including six children, they found in two boats on the Danube river early on Tuesday. The Danube forms the border between southern Romania and Bulgaria. The people told police they had travelled through Turkey and then into Bulgaria and wanted to reach Germany. They said each family had paid €35,000 (£31,000).