Bangkok (AFP) - Thai Prime Minister Prayut Chan-O-Cha's success in a court case seeking to throw him out of office is the latest victory for the former army chief who has escaped unscathed from several legal skirmishes.
The ruling by the Constitutional Court means the 68-year-old, who came to power in a 2014 coup, can play host when Bangkok rolls out the red carpet for November's APEC summit.
Prayut, one of the kingdom's longest-serving prime ministers, welcomed the ruling with a bullish pledge to push on with his agenda.
But with just a few months to go before a general election, his popularity is at a low ebb.
The court suspended Prayut from office last month while it decided whether he had reached the eight-year term limit laid down for the prime minister.
While the nine-judge panel ruled in his favour on Friday, the episode has been damaging for his image, said Naresuan University political scientist Napisa Waitoolkiat.
"The Constitutional Court's suspension of Prayut from the premiership totally made him lose face," she told AFP this week ahead of the verdict.
The case was just the latest in a series of legal battles Prayut has faced during his rule.
In late 2020 the Constitutional Court ruled in his favour in a challenge to his use of an army residence even after he left the military top brass.
The year before, the same court refused to rule on another challenge about him missing out part of his oath of office when being sworn in as PM.
Further burnishing his credentials as a survivor, Prayut held on throughout youth-led pro-democracy rallies that sprang up in Bangkok in 2020 calling for his resignation -- the biggest seen in the city since the 2014 coup.
But now the polls look bleak for Prayut -- in a recent survey of 2,500 people by the National Institute of Development Administration he was ranked only fourth in a list of prime minister candidates with just 10.5 percent support.
And his Palang Pracharath Party is also struggling with around 5.5 percent backing.
Within his ruling coalition Prayut has had to contend with growing factionalism and defections -- last year he survived a plot to overthrow him by a minister.
Soldier to survivor
Born on March 21, 1954 into a military family in northeastern Thailand's Nakhon Ratchasima province, Prayut rose from military college to become commander of the prestigious Queen's Guards in 1980.
He married a university educator, Naraporn, in 1984 and the couple have twin daughters Nittha and Tanya, who enjoyed brief fame in a pop band in 2006.
In 2010 Prayut was involved in military decisions to crack down on "Red Shirt" protesters -- mostly rural supporters of former prime minister Thaksin Shinawatra, who was ousted in a 2006 coup -- in which 90 people were killed.
Four years later Prayut launched the latest of the more than dozen coups to have rocked Thai democracy over the last 90 years, ousting Thaksin's sister Yingluck Shinawatra's democratically elected government.
Prayut introduced martial law and headed the junta regime for five years before clinging on to power after a disputed 2019 election.
Over the years he has shown occasional glimpses of his softer side through poetry and songwriting.
In 2018 he released a Valentine's Day love ballad to Thailand titled "Diamond Heart", featuring lyrics that include "Did you know your smile is my happiness?" and "No matter how tired and difficult, let's hold hands".
But he has taken a brusque approach to journalists at times.
Last year he sprayed reporters with hand sanitiser, and at a 2018 press conference he left a cardboard cut-out of himself to answer awkward questions.
Now reinstated, Prayut will be able to rub shoulders with world leaders as APEC host in November.
"I think he had longed for this moment," Napisa said.
"He wants to show the world how great Thailand is, how great a prime minister he has been in running the country, how his government has done a brilliant job."
But with the economy wobbling and voter discontent growing, it remains to be seen whether the summit will also be the great survivor's swan song.