A Thai court has ordered Prime Minister Yingluck Shinawatra to step down after finding her guilty of abusing her power, prolonging a political crisis that has led to violent protests and brought the economy close to recession.

The decision is bound to anger supporters of Ms Yingluck, but the court did allow ministers not ­implicated in the case against her to stay in office, a decision that could take some of the sting out of any backlash on the streets.

After the ruling, the cabinet said Commerce Minister Niwatthamrong Boonsongphaisan, who is also deputy prime minister, would replace Ms Yingluck, and the caretaker government would press ahead with plans for a July 20 election.

"The caretaker government's responsibility now is to organise an election as soon as possible," said Mr Niwatthamrong, a former ­executive in a company owned by Thaksin Shinawatra, Ms Yingluck's brother and himself a former prime minister who was ousted by the military in 2006.

"I hope the political situation will not heat up after this," he said of the court ruling.

Thailand's protracted political crisis broadly pits Bangkok's middle class and royalist establishment against mainly poor, rural supporters of Ms Yingluck and Mr Thaksin, who lives in exile to avoid a 2008 jail sentence for abuse of power.

Ms Yingluck, who faced six months of sometimes deadly protests in Bangkok aimed at toppling her government and ending the considerable political influence of her brother, thanked the Thai people in a televised news conference. "Throughout my time as prime minister I have given my all to my work for the benefit of my ­countrymen ... I have never committed any unlawful acts as I have been accused of doing," Ms Yingluck said, smiling and outwardly upbeat. "From now on, no matter what situation I am in, I will walk on the path of democracy. I am sad that I will not be able to serve you after this."

Despite her removal from power, there is no obvious end in sight to the turmoil in Thailand, with protesters opposed to Ms Yingluck and her government still pushing for political reforms before new elections.

The judge who delivered the verdict at the Constitutional Court said Ms Yingluck had abused her position by transferring a security chief to another post in 2011 so that a relative could benefit from subsequent job moves.

The court ruled nine ministers linked to the case should step down but others could remain, leaving Ms Yingluck's ruling party in charge of a caretaker government.

Ms Yingluck, a businesswoman until entering politics to lead her party to victory in a 2011 election, was not in court on Wednesday. Mr Thaksin, based in Dubai, was unavailable for comment.

Financial markets took the ruling in their stride. The stock market had fallen as much as 1.1% early on, as investors worried about unrest if Ms Yingluck's whole cabinet was forced out, but the index ended down just 0.1%. The baht was barely changed at 32.37 per dollar.

Yingluck's supporters accuse the Constitutional Court of bias in ruling against governments loyal to Mr Thaksin. In 2008, the court forced two prime ministers linked to him from office.

"We were bracing ourselves for this verdict. Everything our enemies do is to cripple the democratic process," said Jatuporn Prompan, the leader of pro-Shinawatra "red shirt" activists.

Asked about a vow to resist Ms Yingluck's removal that had raised fears of violence, Mr Jatuporn replied: "There is no reason why we should take up arms. We will rally peacefully as planned on May 10."

In Thailand, the prime minister is normally elected by the lower house of parliament, but that was dissolved in December when Ms Yingluck called a snap election to try to defuse protests. From that point, she headed a caretaker administration with limited powers. A February election was disrupted and later declared void.

Ms Yingluck and the Election Commission agreed last week a new ballot should be held on July 20, but the date is bound to be opposed by protesters.

Mr Thaksin or his loyalists have won every election since 2001 and would probably win again.