By Jonathan Head, Thanyarat Doksone and Kelly Ng of BBC
Thailand's parliament has picked Paetongtarn Shinawatra, the daughter of billionaire tycoon and former leader Thaksin, as prime minister.
At 37, she will be the country's youngest PM and the second woman in the post, after her aunt Yingluck.
Her selection comes just two days after former PM Srettha Thavisin was dismissed by a constitutional court. Both are from the Pheu Thai Party, which came second at the 2023 election but formed a ruling coalition.
Paetongtarn faces the difficult task of reviving Thailand's stalled economy and avoiding the military coups and court interventions which have deposed four previous administrations led by her family.
Paetongtarn, who received 319 endorsement and 145 against votes on Friday, is the fourth member of the Shinawatra clan to become prime minister in the past two decades.
The other three, including her father Thaksin and aunt Yingluck, were deposed by military coups or constitutional court rulings.
The same court dismissed Thavisin on Wednesday for appointing to his cabinet a former lawyer who was once jailed.
After being put forward as the PM candidate, Paetongtarn told reporters at Pheu Thai's headquarters on Thursday that she admired Srettha's work and thought his dismissal was unfortunate.
Educated at elite schools in Thailand and at university in the UK, she spent some years working at the Shinawatra family's Rende hotel group, where her husband serves as deputy chief investment officer.
She joined Pheu Thai in 2021 and was appointed party leader in October 2023.
Paetongtarn's appointment brings fresh energy to Thailand's top leadership. Members of Pheu Thai may also be holding out hope that she can help revive the party's political fortunes.
Thaksin first became prime minister in 2001, but his second term in office ended abruptly after his government was deposed by a military coup in 2006. He returned to Thailand after 15 years in exile last October, hours before Srettha was voted prime minister.
He was allowed to return as part of a grand bargain with his old conservative enemies, who are now in coalition with Pheu Thai.
In June, he was charged with insulting the monarchy. He is the most high-profile figure to face charges under Thailand's notorious lese majeste law, which has been used against political dissidents.
Wednesday's ruling to dismiss Srettha is also being widely interpreted as a warning to Thaksin, who still dominates Pheu Thai, to rein in his ambitions.
Yingluck won a landslide in the 2011 election, but she too was later disqualified by the courts, and her government ousted by a second coup. She is now living in exile.
- This story was originally published on BBC