BUDAPEST — During the final days of communism in Hungary, a young, liberal dissident wrote to a foundation run by the Hungarian-American philanthropist George Soros, asking for a grant to finance his research into grass-roots democracy.

Hungary would soon “transition from dictatorship to democracy,” the student wrote in 1988. “One of the main elements of this transition can be the rebirth of civil society.”

The student was Viktor Orban. Now the prime minister, Mr. Orban is expected to lead his party to victory in parliamentary elections on Sunday — not as the pro-Western statesman he once promised to be, but as a hero to the far-right, a scourge of civil society (and of Mr. Soros), and the embodiment of the failed promise of liberalism in post-Cold War Eastern Europe.

Each country has its own story. But societies across Central and Eastern Europe are dominated by similar figures — some by politicians who, like Mr. Orban, have lost interest in the liberal democratic project that followed the crumbling of communism in 1989, and others by those with different motivations who have exploited voters’ growing disaffection with liberalism.