BUDAPEST, Hungary — The foundation of billionaire philanthropist George Soros said Tuesday that it is relocating its headquarters to Berlin from Budapest in the wake of what it called an "increasingly repressive" environment in Hungary.

The Open Society Foundations, or OSF, said the move is because of the Hungarian government's plan to "impose further restrictions on non-governmental organizations through what it has branded its 'Stop Soros' package of legislation."

Hungarian Prime Minister Viktor Orban has accused the 87-year-old Soros of being part of a strategy to flood Europe with migrants and of meddling in domestic affairs — something Soros and his organization say isn't true.

Orban was re-elected last month to a third consecutive term during a campaign that was based heavily on demonizing migrants and blaming Soros and organizations supported by his Open Society Foundations. Orban now plans a package of laws dubbed "Stop Soros" that would greatly restrict non-governmental groups working with refugees and asylum-seekers.

Patrick Gaspard, the OSF's president, said the government has "denigrated and misrepresented our work and repressed civil society for the sake of political gain, using tactics unprecedented in the history of the European Union."

Csaba Csontos, spokesman for the foundation in Budapest, told The Associated Press that the Hungarian government had carried out a "smear campaign" that "misinterpreted deliberately and distorted the views of our founder."

Csontos said that even though the international hub would move, local work would continue in Hungary.

"We will remain committed to the Hungarian civic society, and we will continue our supporting role for the Hungarian civil society, NGOs, local communities, as we did during the last three decades," Csontos said.

Hungarian government spokesman Zoltan Kovacs accused the Soros foundation of "fleeing from transparency."

"They don't want the public to know exactly what they are engaged in and in what way and thanks to what financing they are supporting immigration," Kovacs told the AP in a statement.

"They want to create an immigrant continent and an immigrant country, but the Hungarian government and Hungarian laws are preventing them from doing so. For this reason they are fleeing abroad to avoid Hungarian law and will continue to apply pressure from there," Kovacs added.

Many critics have described Orban's campaign against Soros, a Hungarian-born Holocaust survivor, as anti-Semitic.

Another Budapest-based institution founded and funded by Soros, the Central European University, said it wasn't affected by OSF's decision — even though its fate also hangs in the balance.