Hungary's parliament has approved a law imposing strict regulations on foreign-funded non-government organisations.
The new rules increase reporting requirements for the groups, which risk closure for non-compliance.
Critics say the move is a crackdown on independent voices and an attempt to stigmatise the organisations.
Prime Minister Viktor Orban has accused foreign-funded NGOs, in particular those supported by American billionaire George Soros, of domestic interference.
Groups receiving more than €24,000 ($26,000; £21,000) will have to register as "foreign-supported organisation".
Mr Orban's right-wing government says the measures aim at improving transparency and fighting money laundering and terrorism funding.
But the rules are seen as targeting Hungarian-born Mr Soros, who for decades has given away billions of dollars to promote a liberal, "open society" culture, and has founded the prestigious Central European University.
Mr Orban sees Mr Soros as an ideological enemy, and has declared a battle against liberalism. In April, parliament approved a bill that threatens to close the CEU.
How will it play out? By Nick Thorpe, BBC News, Budapest
The law targets three groups in particular, according to government chancellor Janos Lazar: Transparency International, the Hungarian Helsinki Committee, and the Civil Liberties Union. Many others will also be affected.
The move is the latest in a sustained government attack, in official statements and in government-backed media, on civil society groups which criticise it. Formerly critical media have also been taken over by government allies.
The Central European University is also under threat of closure, due to another law passed in April. A "national consultation" was recently concluded by the government, which aimed to stir up the public against internal and external "enemies". The latter include "Brussels bureaucrats" - a reference to the European Commission - and Hungarian-born philanthropist George Soros.
The Civil Liberties Union say it will refuse to obey the new law, on the grounds that it breaches the right to freedom of expression and association. If it is closed down, it says it will turn to the Hungarian Constitutional Court and the European Court of Human Rights.
The law, passed by 130 votes to 44 in the 199-seat parliament, resembles legislation introduced in Russia in 2012 requiring NGOs to call themselves "foreign agents" if they get any foreign funding, which led to a ban on Soros foundations.
Human rights group Amnesty International said the Hungarian law was a "vicious and calculated assault on civil society", while Human Rights Watch considered it an attempt of "silencing critical voices in society".