On the edge of a Hungarian cornfield, the beam from a car's headlights reflects in their eyes: Europe's newest residents, catching their breath, fresh from evading border police.

Emotions sway from forlorn to triumphant and back again on this migrant-besieged frontier, as thousands of exhausted trekkers achieve one goal only to face another daunting challenge. Many already have slipped through Syria's border into Turkey lugging children or elderly parents, crossed the choppy seas to Greece and navigated the Balkan nations of Macedonia and Serbia by foot, bus or train.

No razor-wire fence is going to stop them from entering Hungary, the gateway to the 28-nation European Union, and beginning what could be a yearslong legal battle to prove their right to refugee status.

A journalist walking alongside the migrants is surrounded and bombarded with questions. Most seek reassurance that their weeks of physical toil and financial sacrifice — many have paid smugglers more than $3,500 each along the way — have not been in vain.

"Please, tell me, 100 percent, will Germania take me? They do not care if I come to Hungaria? No lie?" asks Mohammed Abdallah, a 35-year-old Iraqi civil engineer from Baghdad.

"If I report to police, if they fingerprint me, will I be allowed to go?" asks Mekdad Marey, a 25-year-old Syrian graphic designer from Damascus.

Marey and the half-dozen Syrian friends he has made on their three-week journey from Turkey all have different final destinations in mind: Sweden, Norway, Belgium, Germany. All agree that economically struggling, anti-immigrant Hungary will not be their home. Marey has a cousin waiting for him in Berlin.

Over the past year Hungary, once a front-line bastion against invasions by the 13th-century Mongols and the 16th-century Ottoman Turks, has become the most popular eastern back door for Arabs, Asians and Africans to reach the heart of the EU without facing further passport or visa checks. As ceaseless as the tides, thousands cross daily along Hungary's approximately 110-mile border with non-EU member Serbia.

Those surging through the Balkans now are racing Hungary's right-wing nationalist government of Prime Minister Viktor Orban, who has ordered army engineers to erect a 13-foot fence along the border. The soldiers already have laid low-level fortifications of razor wire. Three layers of the blade-tipped steel coils stretch as far as the eye can see, gleaming bright silver on a cloudless summer day, looking like the world's biggest Slinkys.

The migrants make short work of these defenses. Operating in teams, they turn off phones and extinguish cigarettes to avoid detection at night, navigating instead by the current full moon. They take turns lifting the bottom razor coil high enough for a fellow migrant to crawl under. Knapsacks are pushed through or tossed over. Some emerge from the cornfields with bloody gashes on their hands, arms or heads.

Then it's a flat-out sprint of 50 meters or so. Hungarian police in sports utility vehicles gun their engines on the dirt road beside the razor wire, trying to catch the migrants before they escape into sun-bronzed fields of corn and sunflowers. Each thick crop stands more than 10 feet high, allowing the migrants to disappear quickly from view.

At night, a lone police helicopter tries to follow groups by searchlight, but usually the migrants can reach the far side of fields without a police tail. Sometimes, police prove swift and physically imposing enough to force a retreat back into Serbia, particularly for migrants slowed by infirmity or a child. But such defeats prove only temporary, with another point in the wire selected for the next night.

For those evading the law, the goal is to get through Hungary without leaving a bureaucratic trace. Their fear is that otherwise any other EU nation can deport them back to Hungary, their EU entry point and the place where they are supposed to claim asylum. In practice, however, EU statistics show this increasingly does not happen. Orban this year has vowed to reject any such deportees, and Germany just announced it has suspended enforcing the rule on the grounds of pointlessness.

Those seeking an officially recorded point of entry to Hungary need only follow the razor wire to the cross-border rail track near Roszke, a village of 3,000 beside the highway linking Belgrade and Budapest, the Serbian and Hungarian capitals. Here, because the train tracks cannot be blocked with fencing, Hungarian police have created a bottleneck entry for migrants.

Which path to take?

Many travelers, chiefly citizens of war-ravaged Syria, spend days camped out in Serbia debating whether to go at night or dawn under the wire, then into the arms of paid smugglers for a final journey by vehicle to Western Europe — or to walk openly down the train track into the unwelcoming arms of Hungary's police and immigration staff.

Bashar Botros, walking from Kanjiza, the migrants' last camping site in Serbia before the Hungarian border, said his family had hoped to live in their beloved Syria for the rest of their lives "but the war didn't let us live like normal people." Now, as he walked along the rail line, Botros planned to go to college in Germany and studied German on his smartphone.

"I am very excited, actually, to study in Germany," he said, praising its universities as "the best in the world."

For those walking along the tracks, fear of the unknown swells as Hungary's razor line comes into view. Some pause and pitch tents just yards from two whitewashed stones bearing Cyrillic letters marking their exit from Serbia.

Sometimes the next choice comes down to logistics: If your smartphone has died, you cannot use satellite navigation to cross the border, nor can you connect with a smuggler in Hungary. The lack of battery life can overpower one's desire to stay off the state's radar, can spark a decision that reverberates for a lifetime.

Many opt to pay smugglers to drive them surreptitiously through Hungary, despite the deaths last week of 71 migrants in a Hungarian truck abandoned along an Austrian highway. Police say they have arrested nearly 800 suspected human traffickers already this year, compared to 593 in all of 2014. Last week they confiscated 16 vehicles carrying about 100 migrants.

As trekkers pass the humble border markers, nobody celebrates. There's simply no energy left. They have been walking for seven hours or more from Kanjiza, sweat dripping as they fend off temperatures reaching 35 degrees Celsius (95 degrees Fahrenheit). When bottles of water are offered, they are taken immediately with speechless gratitude.

Those who report to Hungarian authorities face long, uncomfortable waits in the blazing sun because the police-commandeered buses come infrequently. The only facilities are six portable toilets. Some migrants erect small pup tents for shelter while others protest, standing in the garbage-strewn field chanting in English: "We want to go to camp!" ''Children sick! Children die!" Scuffles sometimes break out in the rush to get a seat on the next bus.

Those buses travel only a mile or so to a military-style compound behind barbed wire that media are barred from entering or filming. There, amid rows of olive drab canvas tents, the migrants are fingerprinted, photographed and identified by name, hometown and birthdate — an often inaccurate effort, given that most have chosen to dump their national IDs long ago. Within a few days, all those registered are supposed to report to large residential compounds deeper in Hungary. Most abscond from those open-door migrant facilities, if they ever check in at all.

Everything comes back to that crucial decision by the razor-wire fence.

Once Hungarian police come into view, pepper spray and clubs in their belts, nervous migrants sit down beside the cornfields right on the border, where campfire-blackened, half-eaten cobs lie strewn all about. Children, almost comatose from the heat, are laid out on blankets to sleep. Adults discuss their options in Arabic.

Soon, most will walk to the brawny police, the fetid toilets and the crowded buses. Others, unconvinced, will turn back to Serbia, plotting an overnight dash under the wire and through the corn.