Hungary’s parliament on Wednesday approved a package of bills that criminalizes some help given to illegal immigrants, defying the European Union and human rights groups.

The legislation narrows the scope for action by non-governmental organizations (NGOs), making their workers liable for jail terms for helping migrants to seek asylum when they are not entitled to it.

Prime Minister Viktor Orban has led eastern European opposition to EU quotas that aim to distribute asylum seekers around the bloc, criticizing the open-door policy that German Chancellor Angela Merkel proclaimed at the height of the European migrant crisis in 2015.

Story continues below advertisement

Orban’s right-wing Fidesz party tightened its grip on parliament in April elections after campaigning on an anti-immigration platform. Fidesz also demonized Hungarian-born U.S. billionaire George Soros and the liberal NGOs he backs, naming the new legislation the “STOP Soros” law.

Orban accuses Soros of encouraging mass immigration to undermine Europe, a charge he denies.

“The Hungarian people rightfully expect the government to use all means necessary to combat illegal immigration and the activities that aid it,” Interior Minister Sandor Pinter wrote in a justification attached to the draft legislation.

“The STOP Soros package of bills serves that goal, making the organization of illegal immigration a criminal offence. We want to use the bills to stop Hungary from becoming a country of immigrants,” he said.

Story continues below advertisement

Parliament, where Fidesz has a two-thirds majority, also passed on Wednesday a constitutional amendment stating that an “alien population” cannot be settled in Hungary – a swipe at Brussels over its quota plan.

Germany’s Europe minister Michael Roth expressed regret that Hungary had not waited for the Venice Commission, an expert body, to issue a report on the issue along with the Organisation for Security and Cooperation in Europe.

“We share the concerns of the Venice Commission regarding the criminalization of the activities of non-governmental organizations in the area of refugee aid,” he said.

TOUGH STANCE IS VOTE-WINNER

Immigration has become a major concern for voters across the EU, helping to propel anti-migrant parties into power in Italy and Austria and threatening to fracture Merkel’s three-month-old coalition in Germany.

Story continues below advertisement

Orban has played on Hungarians’ memories of large numbers of mostly Muslim migrants fleeing war and poverty who surged into the country in the summer of 2015.

Most moved on to wealthier western European countries, but Orban has branded the migrants a threat to Europe’s Christian civilization and built a border fence along Hungary’s southern borders to deter more from coming.

Hungarian statistics show 3,555 refugees living in Hungary, a country of 10 million, as of April. Only 342 people were registered as asylum seekers in the first four months of this year, mostly from the Middle East, and 279 were approved.

The Hungarian Helsinki Committee, a rights group, said on Wednesday the narrowing definition of who counts as a refugee essentially means nobody entering Hungary by land would be entitled to such treatment.

Story continues below advertisement

“Instead of giving protection against persecution, the Hungarian government has decided to join the ranks of the persecutors,” Helsinki Committee Co-Chair Marta Pardavi said.

The Orban government expects possible legal action by the European Commission, the EU’s executive arm, over the new law.

The Venice Commission had asked Hungary to refrain from approving the new law until its report is published.

Orban has also tightened state control over the media, major business sectors and the courts since taking power in 2010.

Parliament also agreed on Wednesday to set up a new judicial branch for administrative cases that critics say may increase political influence over judges. Another change narrowed the right to free expression and assembly.