Deputy leader of People Power party (PPP) Somchai Wongsawat was elected prime minister by parliament as expected on Wednesday morning with a solid 298 votes from PPP and the coalition.
He is the 26th prime minister in moder Thai history.
The opposition leader Abhisit Vejjajiva, nominated as a token candidate to oppose the government, received 163 votes from his Democrat party members. There were five MPs who abstained from voting.
After the House speaker adjourned the meeting, Mr Somchai later greeted Mr Abhisit and thanked core members of the coalition parties, such as Chart Thai party leader Banharn Silpa-archa and Pracharaj party leader Sanoh Thienthong, for giving him support.
Mr Somchai, brother-in-law to ousted premier Thaksin Shinawatra, will take office once he is endorsed by His Majesty the King.
Prior to the vote, Mr Somchai expressed confidence that he would be voted as the prime minister.
"There is no rebellion in the party," he told reporters upon arriving at parliament. "My family fully supports me to work to the best of my ability."
Mr Abhisit, meanwhile, called on the new prime minister to hold talks with anti-government protesters and step out of Mr Thaksin's shadow.
"The new prime minister must clearly show how he is going to ease the situation. He must work to erase any doubts," Mr Abhisit said.
Shortly after the vote, core leaders of People's Alliance for Democracy (PAD) Chamlong Srimuang and Somsak Kosaisuk held a news conference, saying that the group does not accept Mr Somchai because he is a nominee of Mr Thaksin.
By Bangkok Post Reporters
Deputy leader of the People Power party (PPP) Somchai Wongsawat is poised to become prime minister after securing backing from a rebel faction and the five coalition partners on Tuesday.
Boonchong Wongtrairat, a member of the rebel faction associated with Newin Chidchob, said all 73 MPs in the faction have agreed to comply with the party's resolution to nominate Mr Somchai for the post of prime minister.
The group was earlier opposed to the nomination of Mr Somchai, a brotherin-law of deposed prime minister Thaksin Shinawatra, on grounds that the family ties would intensify political tensions.
PPP MPs backing Mr Somchai threatened on Monday to call for a House dissolution if the PPP failed to make him the government leader.
Following the Newin faction's change of heart, the PPP and its five coalition partners last night announced they would support Mr Somchai.
The House of Representatives will meet Wednesday to select the prime minister to succeed Samak Sundaravej, who was disqualified by the Constitution Court for receiving payments for hosting television cooking shows.
Mr Banchong said his faction has reversed its stand because of Mr Somchai's pledge to address its concerns about the continuing political strife.
"He insists he can solve what we 73 MPs are worried about. He also pledges to uphold democracy and achieve reconciliation," said Mr Banchong.
But he said the group is demanding Mr Somchai say in parliament how he will ease political confrontation, create national reconciliation, uphold constitutional democracy with the monarch as head of state and enforce the law.
Supachai Phisu, a PPP MP for Nakhon Phanom and a member of the faction, gave an assurance that the Wednesday voting will not end in chaos like it did on Sept 12, when coalition parties boycotted the House meeting, scuppering the planned reinstatement of Mr Samak, who later gave up his bid to regain the post.
A source in the PPP said the faction's support for Mr Somchai followed negotiations between Mr Newin, Mr Somchai, his wife Yaowapa, and Pongthep Thepkanchana, Mr Thaksin's spokesman.
Through Mr Somchai's coordination, Mr Newin managed to secure a pledge from leaders of coalition partners that they would work with the PPP instead of leaving it to deal with problems alone, as it did with Mr Samak, the source said.
Mr Newin also received assurances, also through Mr Somchai, from army chief Gen Anupong Paojinda that there would not be a military coup to topple Mr Somchai if he was elected as prime minister, the source said.
According to the source, Mr Newin was not sure that his group would enjoy support from Mr Somchai as it did from Mr Samak.
However, the group is likely to retain its four cabinet seats — deputy interior minister, deputy agriculture minister, deputy education minister and deputy transport minister.
It was reported that his group would lobby for the appointment of Lt-Gen Udomchai Ongkhasingh, a former Third Army chief, to be deputy defence minister. Other factions were said to support Gen Ruengroj Mahasaranont, deputy leader and former supreme commander, for the job.
Mr Somchai said he was ready for public scrutiny.
"I cannot deny my family ties, but what matters is how I behave. From where I stand, I cannot escape scrutiny," he said.
Mr Somchai said he was not thinking about "taking back" Government House from the People's Alliance for Democracy demonstrators.
Democrat MP Alongkorn Polabutr called on the PPP to review its planned nomination of Mr Somchai, saying it would be a political timebomb due to his close ties with Mr Thaksin.
The PAD reiterated its rejection of Mr Somchai and any other member of the PPP as prime minister.
PAD coordinator Suriyasai Katasila said that with Mr Somchai as the government leader, the political turmoil would continue.
Leaders of six coalition parties held a Tuesday night dinner and news conference to announce they will back acting premier and deputy People Power party leader Somchai Wongsawat as prime minister when parliament meets on Wednesday.
Mr Somchai, caretaker prime minister, thanked the leaders and MPs of the coalition parties for supporting him.
"The six parties will form the government together, and will vote for the prime minister tomorrow (Wednesday)," Mr Somchai, brother-in-law of ousted premier Thaksin Shinawatra, said at the news conference.
All five coalition leaders were present: Chart Thai party leader Banharn Silpa-archa, its deputy leader Somsak Prissananantakul, Pracharaj chief adviser Sanan Kachornprasart, Pracharaj deputy leader Uraiwan Thienthong, Ruam Jai Thai Chart Pattana leader Chetta Thanajaro, its deputy leader Prapas Limprapan, Matchimathipataya party leader Anongwan Thepsuthin, its secretary-general Banyin Tangpakorn, Puea Pandin leader Suvit Khunkitti, its deputy leader Ranongrak Suwanchawee and its spokesman Chaiyos Jiramethakorn.
Mr Banharn, whose party members did not show up at the parliament for the vote last week, said his party will support the nominee of the party with the majority vote (which is People Power party) as new prime minister.
Earlier in the day, PPP MPs agreed to back Mr Somchai as the leader of the government, averting what many media analysts claimed was the threat that parliament would be dissolved for a snap election.
Asked how the government would proceed with cases against fugitive ex-prime minister Thaksin Shinawatra, Mr Somchai replied that the government will rely on the judicial process to handle the cases. Mr Somchai is married to Mr Thaksin's sister.
"The government has no responsibility to protect anyone," he said. "Everything will go according to judicial procedures. The government will ensure that everything follows the rule of law."
If elected, Mr Somchai will serve as Thailand's 26th prime minister.