Some Hungarians wore traditional uniforms to vote
Hungary's conservative opposition party, Fidesz, has secured a convincing victory in parliamentary elections, ousting the Socialists.
Fidesz leader Viktor Orban said Hungarians had voted "to defeat hopelessness".
The far-right Jobbik party, which capitalised on anti-Semitism and anti-Roma sentiment, will enter parliament for the first time.
The final division of seats will only be decided after the second round.
This will be held on 25 April.
Mr Orban, who is set to be the next prime minister, said: "Hungarians voted on Hungary and Hungary's future. Today Hungary's citizens have defeated hopelessness.
"I feel it with all my nerves and know it deep in my heart that I face the biggest task of my life. I will need all the Hungarian people to solve that."
Mr Orban, who was Hungary's prime minister from 1998-2002, promised to cut taxes to stimulate the economy.
The country has been badly hit by the global financial crisis, and has had to be bailed out with 20bn euros (£18bn) from the IMF, the World Bank and the EU.
The Socialist government of Prime Minister Gordon Bajnai imposed a tough austerity programme to reclaim some of the money, but measures like tax rises and salary and pension cuts have made it very unpopular.
Preliminary results indicated that Fidesz had won 206 seats in the 386-member parliament, the Socialists 28, and Jobbik 26.
President Laszlo Solyom said the results had brought a "fundamental shift" in Hungarian politics.
"It is unprecedented... for a winning party to secure such a clear and broad-based mandate that we can see now from the numbers," he told reporters.
Conceding, Socialist party chairwoman Ildiko Lendvai said: "If results do not change materially, then one thing is clear: the Hungarian Socialist party has lost the opportunity to govern.
"But it has not lost, moreover it wants to grasp the opportunity to be the strongest opposition party."
The result was a stunning defeat for the Socialist party, which has governed Hungary for the past eight years, and a remarkable victory for Fidesz, says the BBC's Nick Thorpe in Budapest.
The results were announced by the Central Election Commission after several hours of confusion, during which polling stations were kept open later into the evening to allow those queuing outside them to vote.
The final division of the 386 seats in Parliament will only be decided after the second round of the election in two weeks' time, says our correspondent, but Fidesz looks close to achieving its goal of a two-thirds majority in the new Parliament.
That would allow them to make deep structural reforms, including changes to the constitution, he adds.
Jobbik, known for its anti-Semitic and anti-Roma (Gypsy) rhetoric, has risen from nowhere in the last few years, gaining almost 15% of Hungarian votes in European elections last year.
Turnout was about 64%, slightly lower than the first round of general elections in 2006.