The Central European University (CEU) in Budapest has threatened to move most of its teaching to Vienna if Hungary's government fails to remove legal obstacles to its academic freedom.

Although Viktor Orban's government has targeted the CEU's liberal founder, George Soros, it insists it wants the US-registered university to stay.

But sources say it has failed to honour a deal on the CEU continuing to issue American-accredited degrees.

The CEU wants a response by 1 December.

Rector Michael Ignatieff insisted CEU would maintain some sort of presence in Budapest whatever happened, but it would move the bulk of its teaching to a satellite campus it has been preparing in the Austrian capital by September 2019 .

"If the government thinks it can get rid of us that easily, it is mistaken," he told the BBC.

Why is the CEU being targeted?
Backed by the European Commission, the US government, academics and Nobel Prize winners from around the world, CEU has 1,400 postgraduate students from more than 100 countries, and ranks high in global university league tables.

However, it has become a symbol in Hungary of the battle between national populists and liberals.

Prime Minister Viktor Orban declared himself in favour of an "illiberal" society in July 2014, and in 2015 launched his first personal attacks against Mr Soros, blaming his liberal opinions for the influx of refugees and migrants to Europe.

It was only a matter of time before his Fidesz government attacked Mr Soros's pride and joy, the Central European University, which he founded in 1993. A Hungarian-born financier and philanthropist, Mr Soros is seen as a bastion of the ideals of an open society.

Government's measures tighten noose on university
In April 2017, Mr Orban's government made changes to the Higher Education Act, designed to make it almost impossible for the CEU to operate. The government refused to negotiate directly, and there has been only one face-to-face meeting between university and government officials.

A government official reached an agreement in September 2017 with representatives of New York State, where the university is registered, to allow the CEU to stay in Budapest as a US-based university issuing US-accredited degrees. But CEU sources says that has not been honoured.

Since Mr Orban's third landslide majority in April 2018 general elections, the government's stance has hardened further.

In September 2018, the university was told there was no agreement to sign. A study programme for refugees in Hungary has been cancelled because of a new law putting it at risk of a fine; and the teaching of gender studies has had its Hungarian accreditation withdrawn.

US defends university
Despite President Donald Trump's own hostility to George Soros, the new US ambassador David Cornstein has cited the survival of the university in Budapest as the cornerstone of US-Hungarian relations.

He is now in contact with the Hungarian government in a last-ditch attempt to save the university.

Losing the CEU's main campus in Budapest would be a bitter blow to the government's weakened and divided opposition.

Major critical media here have been taken over by pro-government oligarchs or closed down under political pressure in the past year.

In May 2018 the Soros-funded Open Society Foundations moved their headquarters from Budapest to Berlin, citing "the increasingly repressive political and legal environment" in Hungary.

"In liberal Europe being European means nothing at all," Mr Orban said in July. "The situation in the West is that there is liberalism, but there is no democracy."