The Hungarian parliament has passed new legislation that criminalizes lawyers and activists who help asylum seekers.
Anyone "facilitating illegal immigration" will face a year in jail.
Viktor Orban's government has dubbed the legislation the "Stop Soros law", after the billionaire philanthropist it accuses of supporting Muslim migrants.
The vote in Budapest came hours after a number of European Union leaders agreed to hold crisis talks on how to overhaul asylum rules.
Hungary says immigration threatens its national security, but its hardline stance and new law have faced widespread international criticism.
In 2015, 177,000 people sought asylum in Hungary but only a few hundred were accepted. Last year, the number of asylum claims fell to around 3,200.