Thai politicians have approved tycoon Srettha Thavisin as the kingdom's new prime minister, ending three months of political deadlock on the day former premier Thaksin Shinawatra returned from exile.
More than 374 MPs and senators voted in favour of Mr Srettha, according to an AFP count of ballots cast live on Parliament TV - an absolute majority across both houses.
Earlier, Mr Thaksin set foot on Thai soil for the first time since 2008, returning from self-exile to prison.
The billionaire figurehead of the populist Pheu Thai Party, fled abroad 15 years ago before he was jailed in absentia for abuse of power, two years after the military toppled him in a coup, alleging corruption and disloyalty to the powerful monarchy, which he denies.
The 74-year-old appeared briefly with family members at a private jet terminal at Bangkok's Don Mueang airport, smiling and waving to hundreds of supporters, before he was escorted in a police convoy to the Supreme Court, then taken to prison, where, the court said, he will serve eight years.
The former premier will be closely monitored during his time in prison due to his existing health conditions, including issues with his blood pressure, lungs, heart and his spine, prison officials said.
The officials told a press conference Mr Thaksin would be kept at a wing that had its own medical equipment to ensure he received timely treatment, due to his advanced age.
As he emerged from the airport wearing a black suit, red tie and yellow lapel pin bearing a royal insignia, Mr Thaksin clasped his hands together and bowed in a traditional "wai" greeting before a portrait of the king and queen.
Mr Thaksin's daughter, Paetongtarn Shinawatra, confirmed he had arrived safely and posted images on Facebook of a smiling Mr Thaksin with his family, including seven grandchildren.
"Dad has returned to Thailand and has entered the legal process," Ms Paetongtarn said.

The vaunted arrival of Thailand's most famous politician came as the lower house and military-appointed Senate convened ahead of the vote on appointing a new prime minister.
Mr Srettha, a real estate mogul, was thrust into politics by Pheu Thai just a few months ago.
Thailand has been under a caretaker government since March and its new parliament has been deadlocked for weeks after the anti-establishment winner of a May election, Move Forward, were blocked by conservative MPs, leaving heavyweight Pheu Thai to lead a new effort.
A winner of five elections over the past two decades, Pheu Thai, founded by the Shinawatra family, has agreed a contentious alliance including two parties backed by a military that overthrew governments led by Mr Thaksin and sister Yingluck Shinawatra in 2006 and 2014 coups.
His return has prompted widespread speculation that Pheu Thai's alliance with its old enemies in the military and the establishment is part of a behind-the-scenes deal to allow him to come back safely.
Mr Srettha, 60, yesterday said Pheu Thai had not choice but to partner with some rivals that it had earlier vowed not to work with.
"We are not lying to the people, but we have to berealistic," said Mr Srettha, who has the support of 317 members of parliament and needs 58 votes from the Senate to secure the requisite backing of half of the legislature.
Loved and loathed
The return of Mr Thaksin, who is loved and loathed in equal measure in Thailand, is almost certain to overshadow that vote.
Hundreds of red-shirted supporters carrying banners gathered at the airport, outside the court and the prison to greet him, some chanting "PM Thaksin".
A former policeman, telecoms tycoon and owner of Manchester City, Mr Thaksin won the hearts of millions of working-class Thais with populist giveaways ranging from cash handouts and village loans to farm subsidies and universal healthcare.
But his popularity and his support for a new wave of capitalist upstarts put him at odds with a nexus of royalists, military and old money families, triggering an intractable power struggle that is still being played out.
Mr Thaksin maintains all charges and allegations against him were trumped up to keep him from power and has over the years repeatedly reneged on promises to return home.
He has spent 17 years in self-imposed exile since he was toppled in the 2006 coup.
Pheu Thai has denied Mr Thaksin's involvement in its bid to form a government and the former leader has for months denied conspiring with the generals who toppled him and sister Yingluck.
Ms Yingluck, who also lives in self-imposed exile to avoid a jail term for government negligence, said she backed his decision to return.
"For the past 17 years, you feel isolated, lonely, troubled and missing home but you persevered," she posted on Facebook.
"I believe that you have spent time thinking before deciding ... I respect your decisive decision."