“WE’RE not dealing with civil society members but paid political activists who are trying to help foreign interests here.” So claimed Viktor Orban, Hungary’s increasingly autocratic prime minister, last July, in a speech describing his plans to turn his country into an “illiberal state”. This continued an attack that began earlier this year on dozens of non-governmental organisations (NGOs) in Hungary that have received funds from the Norwegian government under a 20-year-old deal to strengthen civil society in poorer parts of Europe. The NGOs, among them the Roma Press Centre, Women for Women against Violence and Labrisz Lesbian Association, are being “audited” by the Hungarian government, leading Norway to suspend its payments in protest. On September 8th police raided two NGOs responsible for distributing the Norwegian grants.

Egypt, meanwhile, is planning to require NGOs to seek approval from a government-appointed committee before they can receive foreign funds. The planned rules are unclear; NGOs fear arbitrary crackdowns on their finances.

Egypt and Hungary are just two fronts in an escalating war waged by authoritarian governments against groups promoting the Western vision of liberal democracy as not just regular elections but public, pluralistic debate. Recent years have seen a big rise in “philanthropic protectionism”, says Douglas Rutzen of the International Centre for Non-Profit Law (ICNL), which tracks how governments treat NGOs. Some, like Hungary, harass foreign-funded NGOs using existing tools, such as heavy-handed investigations. Others are writing new laws that serve the same purpose.

Azerbaijan, Mexico, Pakistan, Russia, Sudan and Venezuela have all passed laws in the past two years affecting NGOs that receive foreign funds. Around a dozen more countries plan to do so, including Bangladesh, Egypt, Malaysia and Nigeria. NGOs focused on democracy-building or human rights are the most affected, but the crackdown is also hitting those active in other areas, such as public health.

In the years following the cold war, some autocratic governments saw welcoming foreign support and cash for NGOs as an easy way to win favour with America and its allies. But the role played in Ukraine’s 2004 Orange revolution by NGOs, including some that had received money from the Open Society Institute, which was founded by George Soros, an American billionaire, led to a change in attitude. The next year Vladimir Putin, Russia’s president, declared that “public organisations” could not receive foreign assistance; by 2012 NGOs that received money from abroad and engaged in “political activities”, broadly defined, had to register as “foreign agents”, a phrase that comes close to implying espionage.

This year, after NGOs refused to comply, Russia’s government gave itself the power to deem them foreign agents by fiat. Last month the Soldiers’ Mothers of St Petersburg, a group seeking information about Russian servicemen thought to have been injured or killed in Ukraine, was declared a foreign agent despite protestations that it receives no money from abroad.

Many of the new laws are broadly drafted and vague about the criteria for blocking foreign cash. Russian NGOs active in sensitive areas, such as human rights, have had their offices raided in the hunt for evidence of foreign influence. Uzbekistan requires all foreign donations to be paid into two state-owned banks, from which very little of it ever emerges. In Egypt, where the government plans to tighten already restrictive laws further, a $5,000 “Nelson Mandela Innovation Award” in 2011 from Civicus, a global network of NGOs, to the New Woman Foundation, an Egyptian NGO, was blocked for unspecified “security reasons”.

Suspicion of foreign funding for NGOs is not new—and is also felt in democracies. A list published by the New York Times on September 7th of grants made by foreign governments to big Washington think-tanks led to claims of undue foreign influence—even though USAID, the American government’s development arm, also funds think-tanks and NGOs abroad. But despite claims to the contrary by Mr Putin and other autocrats seeking cover for their crackdowns, America does not ban foreign governments from funding NGOs, requiring only that they be open about it.

Since 1976 Indian NGOs have needed government approval for foreign donations, in response to what Indira Gandhi, then prime minister, thought was the “foreign hand” of the FBI meddling in her country’s affairs. Recent reports of an intelligence dossier claiming that the activities of foreign-funded NGOs had cut India’s growth rate have sparked fears that Narendra Modi, the nationalistic new prime minister, will tighten the rules further.

In India, restrictions on overseas donations sit alongside a thriving civil society. But the new laws elsewhere should be seen in the context of a much larger list of measures restricting the action of NGOs, says Mr Rutzen of the ICNL—including some that limit freedom of association or the ability to meet without a government representative attending. These have already had a significant effect, according to “Closing Space”, a report by the Carnegie Endowment for International Peace, which lists 50 countries that place some restrictions on overseas funding of NGOs.

In the past two years USAID has been thrown out of Russia and Bolivia. The number of organisations working on political and social issues in Uzbekistan is dramatically lower than a decade ago. In Ethiopia, which in 2009 limited many NGOs to raising no more than 10% of their funds abroad, some human-rights groups have had to curtail their activities or even leave the country.

According to the Closing Space report, Western governments and foundations that fund NGOs abroad did not take the backlash seriously enough at first, perhaps because they mistook a lasting trend for a temporary reaction against the muscular foreign policy and democracy-promoting “freedom agenda” of George W. Bush. Instead, the authors argue, it “should be understood as the ‘new normal’, the result of underlying shifts in international politics that are bound to last for some time.”

Give and take

A fightback is belatedly getting under way. In 2011 the UN appointed Maina Kiai as a Special Rapporteur on the Rights to Freedom of Peaceful Assembly and of Association, to focus on the problem. The Open Government Partnership, an intergovernmental group set up the same year, provides support to governments committed to promoting transparency and a pluralistic civil society. The development arms of the American, British and Swedish governments, and foundations such as Ford, MacArthur and the Open Society Institute, are among those seeking to support NGOs in affected countries. The staff of some vulnerable groups are being trained in how to lobby against repressive laws and do better at domestic fundraising.

Lobbying by the Community of Democracies, another intergovernmental group, is said to have helped stop or soften recent attempts to weaken NGOs in at least five countries. Nonetheless, the tide will be hard to turn. In May Mr Kiai published three general principles to protect “civil space”, the first of which stated that being able to seek funding, and to receive and spend it, is “inherent to the right to freedom of association”. It is a freedom that in many places is increasingly under threat.

Correction:This story originally said that the Open Government Partnership provides cash for governments committed to promoting transparency and a pluralistic civil society. Its support is actually non-financial. This was amended on September 12th 2014.