(Adds more comments, background)

* Decision comes as government moves to tighten grip on NGOs

* PM Orban vilified Soros in election campaign

* Orban has been criticised for eroding democracy

By Marton Dunai

BUDAPEST, May 15 (Reuters) - George Soros' foundation said on Tuesday it would close its office in Budapest and move to Berlin, leaving what it called "an increasingly repressive political and legal environment" in Hungary.

The pro-democracy group said it was pulling out a day after the right-wing government of Prime Minister Viktor Orban announced it would tighten restrictions on non-governmental organisations, under a law dubbed the "Stop Soros " bill.

Orban, who won a landslide election victory last month, has repeatedly accused Soros and his organisation of encouraging migrants and undermining the national culture.

Soros's Open Society Foundations (OSF) organisation said it would continue to support human rights work in Hungary as well as projects linked to arts, media freedom, transparency, education and health care.

But it would move its Budapest-based international operations and staff to Germany.

"The government of Hungary 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," OSF president Patrick Gaspard said in a statement.

Opposition and rights groups have long said that a departure of the OSF would mark a milestone in a slide towards authoritarian rule in Hungary and go against the principles of the EU - a charge dismissed by the government.

Hungarian government spokesman Zoltan Kovacs declined to comment.

Orban has increased his control over the media and put allies in control of formerly independent institutions, while his stand on refusing to accept large numbers of migrants in Hungary has also put him in conflict with the EU.

Orban and Soros have clashed over the 2015 European migration crisis. Orban says Soros is out to undermine Europe's cultural identity while the billionaire has accused him of running a mafia state.

Before the election, Orban's political campaign vilified Soros, and his activity supporting civil society, on billboards nationwide.

Open Society said the campaign had "invoked anti-Semitic imagery from World War II". The government has repeatedly denied this.

The NGO legislation is expected to be one of the first laws passed by the new parliament.

It would allow the interior minister to ban any NGOs active in the immigration field deemed to pose a "national security risk". It would also impose a 25-percent tax on foreign donations to NGOs that back migration. (Reporting by Marton Dunai, writing by Gergely Szakacs and Krisztina Than Editing by Robert Birsel and Andrew Heavens)

Our Standards: The Thomson Reuters Trust Principles.