(CNN) Thailand's Prime Minister Prayut Chan-o-cha has temporarily stepped aside as the country's leader but remains its defense minister, according to a government spokesman.
The unusual leadership reshuffle follows a ruling by the Constitutional Court of Thailand on Wednesday, which ordered Prayut to stand aside while it considers if he breached the eight-year term limit recently written into the constitution.
Prayut took the role of prime minister after a military coup in 2014 before winning a controversial general election in 2019.
In the meantime, he ordered the kingdom's constitution to be re-written, banning the prime minister from serving more than eight years in office. But the question now is whether Prayut has breached his own limit.
Earlier this week the court accepted a petition signed by 172 opposition lawmakers that claims Prayut's rule started in 2014, when he took power in the coup. The court will also likely consider if his term officially began in 2017, when the constitution was rewritten, or even 2019, after the election.
Five out of nine constitutional court judges agreed on Wednesday that Prayut should be suspended while the court considers the matter, but didn't provide a timeline for the ruling. The court gave Prayut 15 days to submit a counter statement as to why he should keep the job, once he formally receives the court paper.
In a statement, Prayut's office said he respects the court's decision.
The order "will not affect the administration of the nation, work carried out by civil servants or the government's ongoing policies," the statement said.
Deputy Prime Minister Prawit Wongsuwan will step in acting as prime minister while the court mulls its final verdict, government spokesman Anucha Burapachaisri told reporters on Wednesday. Prawit himself is former army chief and a longtime supporter of the Thai monarchy.
Fresh elections are due by May next year under the constitution, but the sitting prime minister still has the power to call early elections by dissolving the elected House of Representatives.
Prayut has survived four no-confidence votes in the past months, and looked set to cling on to power until the elections, said Thitinan Pongsudhirak, a professor at Chulalongkorn University in Bangkok.
But critics say it is time for him to go.
"There have been some economic mismanagement, politics is still polarized, since over the past eight years since he's been prime minister -- or since he's been called as the prime minister -- Thailand has not done well," Thitinan said.
While youth-led protests seem to have died down as of late, he said this was because some of the movement's leaders had been prosecuted and grievances over the Prayut's government remain.
Prayut's rule as a military coup leader turned prime minister has been marred with growing authoritarianism and widening inequality.
The former military chief came to power in a bloodless coup in 2014 that overthrew Yingluck Shinawatra's scandal-laden government following six months of civil unrest and violent street protests.
But shortly after taking over, Prayut banned all political campaigning including political gatherings of more than five people. During his leadership, hundreds of activists have been arrested and charged under draconian laws such as sedition or the lese majeste -- which prohibits criticism of the royal family.
In 2020, young people across the country defied threats from the military-backed government to take to the streets and call for Prayut's resignation. The mass protests stemmed from failed promises to restore democracy, and what activists say is a repression of civil rights and freedoms.
The military government's mismanagement in handling of the coronavirus pandemic and economy, nepotism and lack of transparency and accountability, also amplified calls for Prayut to step down.
Dissatisfaction over the military government and the kingdom's monarchy continued well into 2021.
King Maha Vajiralongkorn, who assumed the throne in 2016 and was crowned in May 2019, is believed to spend much of his time overseas and has been largely absent from public life in Thailand as the country grappled with the coronavirus pandemic.
Since becoming King, billions of dollars worth of assets held by the Thai Crown have been transferred to Vajiralongkorn, asserting his control of royal finances and vastly increasing his personal wealth, which drew ire among the public who are required to revere the monarchy.