As thousands of anti-government demonstrators gathered in front of the Hungarian parliament Sunday, Hungary's President Laszlo Solyom took the unusual step to condemn the prime ministers' behavior in a speech on national television.

The president said Prime Minister Ferenc Gyurcsany's admission that he lied to voters about the dire state of Hungary's economy, had undermined "16-years of hard-work" to build a functioning democracy, following decades of Communism. He says, "the prime minister refuses to admit that he used inadmissible means to keep power," and adds, "This undermines confidence in democracy."

Hungary's PM Vows to Stay Despite President's Appeal

Mr. Solyom said the prime minister's behavior has led to over two weeks of anti-government protests, some accompanied by riots, in which hundreds were injured. He suggested the parliament should look at ending Mr. Gyurcsany's mandate. He says the parliament decides who is the prime minister. And he adds the parliament can restore society's confidence (in government).

Hungary's PM Vows to Stay Despite President's Appeal

"The parliamentary majority holds the key to the solution," he said.

Hungary's PM Vows to Stay Despite President's Appeal

With almost all the votes counted, the opposition Fidesz-Hungarian Civic Union appeared poised to win at least 15 of Hungary's 23 largest cities and in 18 of 19 county assemblies. The ruling Socialists and their liberal coalition partner, the Alliance of Free Democrats, narrowly held power in Budapest, where their candidate for mayor was re-elected.

Despite the electoral loss of his Socialist party, Mr. Gyurcsany told supporters he would not resign and said his reforms were the only way to move the country forward.

"I don't think these kind of elections should be a referendum on the government as people are choosing local municipality leaders," he said "I received a lot of criticism these days?But politics should be good for the long term, not for the short term.

Mr. Gyurcsany's Socialist Party has declared it stands behind the embattled prime minister.