Central European University, founded in Hungary after the collapse of the Soviet Union to champion the principles of democracy and free societies, announced on Monday that it was being forced from its campus in Budapest by the increasingly authoritarian government of Prime Minister Viktor Orban.

The closing of the university, founded by the American billionaire George Soros, came after a nearly two-year struggle with the Orban government, which has quashed dissent and consolidated control over all aspects of Hungarian life. The university will move its United States-accredited degree programs to Vienna in September.

“C.E.U. has been forced out,” said Michael Ignatieff, the president of the university. “This is unprecedented. A U.S. institution has been driven out of a country that is a NATO ally. A European institution has been ousted from a member state of the E.U.”

It had been clear for months that the institution would most likely be forced from the country, but Western officials and supporters of the university had hoped to find a last-minute compromise. The university said that effort had failed.