Updated

Thailand's prime minister faces a legal showdown Wednesday, as the country's highest court rules on a case that could toss her out of office and plunge the country deeper into political turmoil.

Prime Minister Yingluck Shinawatra stands accused in Constitutional Court of abusing her authority by transferring a senior civil servant in 2011 to another position, allegedly for the benefit of herself or her Pheu Thai Party.

The court could also rule her Cabinet liable as well, and in a worst-case scenario force them all out of office, leaving a power vacuum that the government's opponents hope to fill with their own loyalists.

Her government's caretaker status — she dissolved Parliament late last year to call early elections, which were disrupted by protesters and then invalidated — complicates an unprecedented situation already unclear under law.

"I would like to deny all allegations I am accused of," Yingluck testified Tuesday. "As the prime minister, I am entitled to carry out responsibilities I have toward the people ... and for the utmost benefit of the general public."

The court, notoriously unsympathetic to her government, is widely expected to rule against Yingluck, who for the past six months has been the target of vociferous and sometime violent street protests demanding she step down to make way for an interim unelected leader.

The campaign against Yingluck has been the latest battle in a long-running war that began when Yingluck's brother, Thaksin Shinawatra, was ousted by a 2006 military coup after protests accusing him of corruption, abuse of power and disrespect for constitutional monarch King Bhumibol Adulyadej. Since then, Thaksin's supporters and opponents have engaged in a power struggle that has on occasion turned bloody.

Thaksin's supporters say the Thai establishment opposes him because their position of privilege has been threatened by his electoral popularity, cemented by populist programs that benefited the less well-off in the vote-strong countryside.

Thailand's courts, like its military, are seen as bastions of anti-Thaksin conservatism, and have a record of hostile rulings toward the Shinawatra political machine, which is fueled by a fortune Thaksin made in the telecommunications sector. Thaksin's opponents, including those who have rioted and attacked police, destroyed public property and occupied government offices, have usually been treated leniently by the courts.

The Constitutional Court in 2007 made a landmark ruling dissolving Thaksin's original Thai Rak Thai party for fraud in a 2006 election, and banned its executives from politics for five years. Thaksin went into self-imposed exile in 2008 to escape a two-year jail sentence for conflict of interest while prime minister.

Thaksin's allies in late 2007 handily won the first post-coup election, but the Constitutional Court in 2008 kicked out two successive pro-Thaksin prime ministers.

A coalition government then cobbled together by the opposition Democrat Party had to use the army to put down pro-Thaksin demonstrations in 2010 that left more than 90 people dead in street battles, but Yingluck and her Pheu Thai party won a sweeping majority in a mid-2011 general election.

Yingluck's fortunes plunged when her party's lawmakers late last year used shady legislative tactics to try to ram through a law that would have given an amnesty to political offenders of the previous eight years, including Thaksin. The move reignited mass demonstrations against Thaksin and his political machine and eventual street fighting by anti-government toughs. Seeking to ease the pressure, Yingluck in December dissolved the lower House and called new elections for Feb. 2.

Her opponents on the street disrupted the polls, which in turn were invalidated by the courts. More than 20 people have died in the latest political violence.

Yingluck's foes also have been seeking to topple her in the courts, in what her supporters describe as an attempt at a "judicial coup." It was anti-government senators who lodged the case over the transfer of National Security Council chief Thawil Pliensri, a move previously ruled unlawful by another court.