Hungary border fence
A Hungarian soldier stands next to the first portion of a temporary fence the Hungarian military is erecting on its border to Serbia in an effort to keep out refugees on July 16, 2015 at Morahalom near Szeged, Hungary. Hungary has become one of the main crossing points, especially for refugees from Syria, Afghanistan and Iraq, who arrive to Europe via Greece and travel through Serbia and Hungary on their way to countries in northern Europe like Germany and Sweden. Arpad Kurucz/Getty Images

A large number of migrants to the EU are now choosing the land route through Greece to enter Hungary and cross into western Europe.

The shift was evident in the first half of the year, with about 79,000 illegal migrants crossing into Greece from Turkey, according to Frontex, the European Union's border watchdog agency. An equal number undertook the sea route to Italy.

Most continued into Hungary which has seen almost 80,000 illegal crossings this year, prompting the government to set up a barbed-wire fence along its border with Serbia.

The migrants from Syria, Afghanistan, Iraq and Libya largely want to just pass through to Germany and western EU nations, but Hungary is not taking a chance with around 1,000 migrants arriving on foot daily.

It began construction of a temporary 13-foot razor wire fence along the roughly 108-mile Serbian border two days ago, in what government officials call the "only immediate solution."

Work on the fence will take place at 10-12 locations simultaneously along the border, the Associated Press reports.

Public and political sentiment has been strong against the refugee influx, with Hungary receiving more asylum applications than any other EU state.

Border crossings a 'crime'

Hungary plans to make illegal border crossings a crime, as opposed to a minor offense, in order to stem the arrivals, according to the prime minister's office.

The government set off an anti-immigrant billboard campaign and a questionnaire to voters that linked migration with terrorism.

It will set up temporary tent camps in rural areas for asylum-seekers and close down its regular migrant housing.

Hungary has also passed legislation allowing it to turn away migrants by declaring neighboring countries, such as Serbia, to be "safe."

The land route is less expensive and dangerous than the sea route and with changed visa rules in Saudi Arabia and Iran, and also the tight border vigilance in Bulgaria, more migrants are opting for the passage through the western Balkans.

Italy being full and the economic crisis in Greece is propelling refugees further northward from Turkey to Hungary in the EU's passport-free Schengen zone. Once there, they can move freely across most internal EU borders.

The price paid to reach the Hungarian border varied from $1,000 to more than $4,000 per person, the New York Times reported.

Resistance to the migrants, many of whom are Muslim, has been growing in the EU, especially after the recent terrorist attacks. Some right-wing parties have not flinched in suggesting locked up camps for refugees.

"Obviously, we would prefer if they didn't enter the country," said Bela Incze of the HVIM, an ultra-nationalist group that seeks a "Greater Hungary." "But if they are here, they shouldn't be allowed to meander without supervision. The authorities should take them to designated camps, which should be locked up."