Experts feared the political crisis could produce further division following two weeks of protests over a leaked admission by Mr Gyurcsany that he lied about the economy to win re-election in April.
"The Hungarian voters tonight (Sunday) ousted the prime minister in
office," the leader of the conservative opposition Fidesz, Viktor Orban, told a press conference after the vote.
He said the results -- which handed most of Hungary's municipal councils and county assemblies to the opposition, with the exception of the all-important capital -- were a "triumph of the people over lies."
President Laszlo Solyom, a non-partisan in a largely ceremonial job, also waded into the tussle.
"The prime minister refuses to admit that he used inadmissible means to keep power.... This undermines confidence in democracy," he told public television.
Mr Solyom has also urged parliament to look at ending Gyurcsany's mandate.
"The parliament decides who is the prime minister. The parliament can restore society's confidence (in government). The parliamentary majority holds the key to the solution," he said.
PM digs heels in
Mr Gyurcsany is standing firm amid continued support from his Socialist Party which said it had full confidence in the Prime Minister.
"We are continuing with our policies, as am I personally," Mr Gyurcsany told a press conference.
He added that he saw the election results as a reaction to an unpopular austerity package, rather than any sort of referendum.
"Those who start these policies can quickly lose popularity," he said.
The European Commission endorsed the package on Tuesday, saying it was "paramount" to slashing Hungary's public deficit.
Hungary has the highest deficit in the European Union at a forecast 10.1 percent of gross domestic product this year.
Opposition triumph
Hungary's interior ministry found the opposition triumphed in most of the elections across the country.
However in the all-important contest for the capital, the incumbent mayor allied to Mr Gyurcsany held on.
Budapest is home to two million people, or one-fifth of Hungary's
population of 10 million.
But elsewhere Fidesz dominated, winning 18 of 19 county assemblies, and a majority of the 23 big cities.
Fidesz and other opposition parties won 52.62 percent of the votes,
compared to 37.73 percent for the governing bloc.
"Politically speaking it is clear that we live in a divided country. There
is Budapest and then there is the rest of the country," said political analyst Gabor Torok.
It was unclear to what extent the "lies scandal" impacted voters, as Fidesz had held a lead of up to 20 percentage points even before the start of anti-government protests.
End of protests
As of early Monday, there was no sign of further anti-government unrest flaring, but security forces remained wary.
The previous round of protests sparked by Mr Gyurcsany's admission briefly degenerated into violence two weeks ago.
Some 250 people were injured in the worst street violence in Hungary since the end of communism in 1989.
