From inside her “war room” in a temporary office at the Defense Ministry, Thailand’s beleaguered Prime Minister Yingluck Shinawatra is watching television feeds of flag-waving protesters trying to bring down her government.

The demonstrators have taken over key pockets of central Bangkok, blocking off their territory with sandbag walls guarded by supporters. They refuse to negotiate, and they’re trampling campaign billboards bearing Yingluck’s image amid increasing doubt that the election she called for next month can be held.

Yingluck can’t order a police crackdown for fear of triggering a military coup. And she is now facing a serious legal threat: The country’s anti-corruption commission has announced that it will probe her handling of a controversial rice policy, an investigation that could force her from office if she is found guilty.

What’s the best way to deal with it all?

“Keep calm. And stay cool,” Yingluck said, flashing a brief smile as she rode an elevator at the Defense Ministry last week, headed for a meeting to monitor the crisis and discuss strategy with top advisers. Yingluck allowed foreign media to accompany her during most of her activities Thursday.

Thailand has been plagued by sometimes bloody bouts of unrest ever since then-Prime Minister Thaksin Shinawatra — Yingluck’s older brother — was overthrown by the army in 2006 amid charges of corruption and alleged disrespect for the monarchy, which he denies.

The coup touched off a societal schism that in broad terms pits the majority rural poor who back the Shinawatras against an urban-based elite establishment supported by the army and staunch royalists who see Yingluck’s family as a corrupt threat to the traditional structures of power. Yingluck’s opponents — a minority that can no longer win at the polls — argue the Shinawatras are using their electoral majority to impose their will and subvert democracy.

The power struggle has taken place against what analysts also see as a battle for control over a crucial transition period when the country’s 86-year-old monarch, King Bhumibol Adulyadej, passes from the scene. But for much of it, Yingluck had stayed out of the spotlight.

Just three years ago, she was largely unknown — the director of a family real estate business, a political neophyte with no experience in government. Today, she is in the political fight of her life — a besieged prime minister who cannot use her own office and whose government has been displaced to myriad backup offices across Bangkok because demonstrators have surrounded her ministries.

“We’ve had to adapt the way that we work. I have ordered every ministry to adapt,” Yingluck said Thursday. “It’s like we are working by remote.”

Protest leader Suthep Thaugsuban — who is wanted by police on charges of insurrection — brazenly vowed to “capture” Yingluck and her cabinet last week. The threat is not taken seriously, but Yingluck takes no risks.

“I don’t go to anywhere deemed dangerous,” she said, responding to a question about her safety.

Since Monday, anti-government demonstrators have tried to keep up the pressure by marching across Bangkok and seizing parts of the city. The protests have been peaceful, but violence has occurred nearly every night, with shooting attacks at protest venues and small explosives hurled at the homes of top protest supporters, including the city’s governor, a political rival of Yingluck’s.

On Friday, a grenade was hurled at marching demonstrators, killing one man and wounding dozens of people. Suthep, who was in the procession but was not wounded, quickly blamed the government. Yingluck urged the police to quickly make arrests, saying she opposed the use of force and was concerned that the situation was becoming increasingly chaotic.

Since assuming the premiership after 2011 elections, Yingluck has struggled to overcome allegations that she is her brother’s puppet. The Pheu Thai party’s landslide victory came largely thanks to Thaksin. The campaign slogan — “Thaksin Thinks, Pheu Thai Acts” — made the party’s political mechanics blatantly clear.

Yingluck’s opponents say she is carrying on the practices of her billionaire brother by using the family fortune and state funds to influence voters and cement her grip on power. But she has widespread support among Thailand’s poor majority because of the populist policies that have brought them things like virtually free health care.

During her first two years in office, Yingluck walked a careful tightrope with the army and her political rivals, managing an unspoken truce that kept the nation calm. But the last few months have badly shaken her grip on power. Critics say she brought much of it on herself with a badly misjudged attempt to rehabilitate Thaksin in a general amnesty bill that triggered widespread opposition.

Thaksin, now living in Dubai, has lived overseas since 2008 to avoid a jail sentence on corruption charges that he says were politically motivated.