Hungary's ruling Socialists have chosen 43-year-old business tycoon and Sports Minister Ferenc Gyurcsany to succeed Prime Minister Peter Medgyessy.
New coalitions will now be formed
Mr Medgyessy stepped down after a row with his Socialist party's liberal coalition partner which followed a government reshuffle.
Defence Minister Ferenc Juhasz said Mr Gyurcsany had won by 453 votes to 166 against key party member Peter Kiss.
"Let's make a good Hungary," Mr Gyurcsany said following the results.
Mr Gyurcsany said he was ready to form a new coalition with the liberal Alliance of Free Democrats who had opposed the sacking of their party member, Economy Minister Istvan Csillag, earlier this month.
An aide of Mr Gyurcsany told Reuters news agency that Finance Minister Tibor Draskovics, who is widely respected by foreign investors, will be asked to serve in the new government.