With 98% of votes counted Hungary's ruling Socialists have won a second term in office, according to national election commission results.
Prime Minister Gyurcsany celebrates with his wife Dobrev Klara
The governing coalition has taken 210 of the 386 parliamentary seats.
Viktor Orban, leader of the main opposition party, Fidesz, has telephoned Socialist Prime Minister Ferenc Gyurcsany to admit defeat.
It is the first time a government has been re-elected since democracy was restored in Hungary in 1990.
Fidesz won 164 seats and the smaller right-wing MDF party 11, according to the partial results.
"We have won!" a beaming Mr Gyurcsany - a millionaire businessman - told supporters gathered at the Socialist Party headquarters.
"We understand the responsibility we have been given. We have to create a better, more successful Hungary that is better to live in," he said.
The BBC's Nick Thorpe describes a party atmosphere in Republic Square in Budapest outside the Socialist party headquarters. Thousands of people were celebrating victory around a large tent lit up in the red Socialist colours.
"We've kicked out every government so far and I think it's finally time we give somebody another chance. Four years is just not enough to complete a programme," Geza Sandor, a 35-year-old voter in Budapest, told Reuters news agency.
Hungary is an extremely polarised country and, with each change of government, winning parties traditionally replace large numbers in the bloated state administration with party loyalists, says our correspondent.
Across the River Danube, on the other side of the city, the defeated Mr Orban lamented the lack of unity on the right.
"Those who join forces win and the losers are those who are unable to co-operate," he told supporters.
He said his party must now rethink its programme but that its basic message - work, the family and the home - would remain.
Four parties remained on the ballot sheet after the first round two weeks ago, but in most constituencies the race was between the two main parties, the governing Socialists and Mr Orban's centre-right Fidesz party.
The government had put continuity at the centre of its campaign, saying that they offer stability.
But our correspondent says Fidesz had accused the government of gross mismanagement of the economy and of misleading the electorate.
New figures show the country's budget deficit running at 8% of GDP, the largest deficit in the European Union.
Most analysts predict that this will prevent Hungary introducing the euro currency in 2010 as planned.