With war continuing to plague the Middle East and Afghanistan, and thousands trying to flee Africa’s grinding poverty, the swell of refugees and migrants hoping to reach Western Europe shows no signs of abating this summer.

For the last few years, the most popular route has been across the Mediterranean on boats run by Libyan smugglers that aimed for the nearest islands off the Italian coast. But as that route has become increasingly dangerous — the range of threats include drowning, abandonment by unscrupulous smugglers and crackdowns by European border patrols — the human tide is shifting. Increasingly, migrants are following a land-based route into Europe by way of Greece and the West Balkans.

But with the alternative crossing come other perils: violence, exploitation, intolerance. Though most European countries are overwhelmed by the tide, fueling an anti-immigrant backlash in many places, Eastern European countries like Hungary, Serbia and Bulgaria are considered particularly hostile.

Still, the migrants keep coming.

Mohamd, like more than two dozen migrants interviewed at the brick factory and other sites along the border here with Hungary, declined to give his last name for fear of reprisals against relatives left behind and unwelcoming authorities on the road ahead. His was a typical story.

He left Syria on May 16, made his way through Turkey and slipped across the border into Greece.

Along the way, there may be short bus rides or miles covered by train. But for many of the migrants — including almost all of those interviewed at the brick factory — the journey was largely undertaken on foot. They follow rail lines or paths passed along by smugglers or passed down the communications chain from refugees farther ahead.