Hungarian soldiers have started building a controversial fence along its border with Serbia, in an effort to stop the rising flow of migrants trying to enter the European Union. Work on the fence is being carried out at several locations at once along the 175km (109m) border, with about 900 soldiers helping to construct the four-metre high fence, which the government wants to finish by 31 August. Some elements of the fence, including the razor wire to be placed on top of the barrier, is being prepared by inmates at Hungarian prisons.

The initial sections of the fence will be built in the areas, like those near Asotthalom, which are most heavily used by human smugglers, blamed by Hungarian authorities for the jump in the number of migrants. More than 100,000 migrants have reached Hungary on routes across the Balkans so far in 2015, compared with fewer than 43,000 asylum seekers last year and 18,900 in 2013. The Hungarian government says it expects up to 300,000 migrants to reach the country this year.

Peter Szijjarto, minister of foreign affairs and trade, said that both Hungary and Serbia are facing "unprecedented immigration pressure" and that more migrants are coming to the EU via the land route across the Balkans than by crossing the Mediterranean. "This means that this year in the EU, the highest number of illegal immigrants has arrived in Hungary," Szijjarto said. Bulgaria has built its own fence along a section of its 240km border with Turkey, and it has plans to extend it.

Hungary recently tightened its migration policies, including fast-track court procedures for asylum seekers and the possibility of detaining them for longer periods. Hungary has added Serbia, Kosovo and Macedonia to its list of "safe countries", so it can return any migrants reaching Hungary from those states.

Amnesty International, while recognising that the migrant flow on Europe's borders is "simply untenable", strongly criticised the new rules. "This is a thinly veiled attempt by Hungary to dodge its obligations under national and international law to assist asylum seekers who have a globally recognised right to claim international protection," said John Dalhuisen, the group's director for Europe and Central Asia.

Migrants Hungary EU fence
Many migrants travel from Syria or Iraq, through Turkey into Greece, and then on into Macedonia and Serbia, heading for Hungary and the EU Google Maps

While most migrants once hailed from Kosovo, now about 80% of them are from war zones like Syria, Iraq and Afghanistan. Nearly all request asylum in Hungary but try to move to EU countries further west like Germany, Sweden or Britain before their claims are settled.

Typically, the migrants enter the EU first in Greece, crossing from Turkey, but are waved through by authorities overwhelmed by an economic crisis and unable to cope. From there, the main route goes through Macedonia into Serbia.

Macedonia has become a major transit route for Middle Eastern and African refugees seeking to reach western Europe from Greece. Many walk for miles along the train tracks heading north and then huddle on the Greek border, waiting for a chance to sneak into Macedonia.

Migrants are entering Serbia from southern neighbour Macedonia at a rate of over 1,000 per day. They fill the park at the main railway station in Serbian capital, Belgrade – an ironic sight in a country that thought it had seen the end of refugee flight with the wars of Yugoslavia's bloody collapse in the 1990s. Overwhelmingly poor and socially conservative, Serbian society has been taken by surprise by the sudden surge in Middle Eastern, African and Asian migrants; the government fears a strain on social harmony and the its own meagre coffers.

In the northern town of Subotica, migrants sleep on the filthy floors of an abandoned, 100-year-old brick factory and in the surrounding scrubland, washing themselves at roadside taps.

Many fear that the fence that Hungary is building along its Serbian border will create a migrant bottleneck in the Balkan country. Rados Djurovic, head of the Asylum Protection Centre, compared the likely outcome to the French port of Calais, but says Serbia "will be on a far greater scale". In Calais, some 3,000 migrants are camped out trying to reach Britain; in the Balkans, well over 100,000 are believed to have entered illegally into Hungary so far this year. While the fence is unlikely to stop many of them, it will slow them down, likely creating vast squats in northern Serbia as winter approaches and temperatures drop below freezing.

Every day, some 1,500 mostly Afghan and Syrian refugees stream through the woods from Serbia into Hungary. Angry locals miss their quiet, insular life. "People here have had enough," Olga, a Hungarian woman in her fifties who did not want to give her last name, told Reuters. Her farm is within earshot of the border. Migrants have done her no harm but she still views them with suspicion and resentment. "Groups of people keep coming by. My dogs bark all night and I'm afraid to leave my windows open," she said, adding that the dark faces were unsettling her. "I worry about my daughters."

While Hungary is a transit route rather than a destination for most, the growing influx is wearying and polarising the central European country and fuelling racism. The country's right-wing Prime Minister Viktor Orban has justified his stance on migrants by conflating immigration with terrorism, increased crime and unemployment.

Hungary, a landlocked central European country of 10 million people, is in the EU's visa-free Schengen zone and thus an attractive destination for migrants entering Europe through the Balkans from the Middle East and Africa. Most of them then move on to wealthier western Europe. A migrant from the Syrian city of Aleppo told Reuters it had taken him just two weeks to come this far. "We are quick," he said. "We are quick, to beat the fence."