About 1500 anti-government protesters have forced their way into the compound of Thailand's army headquarters, the latest ­escalation in a city-wide demonstration seeking to topple Prime Minister Yingluck Shinawatra.

"We want to know which side the army stands on," shouted one protester as others broke through padlocked iron gates in Bangkok's historic quarter, waving Thai flags and blowing whistles.

In another district, about 1000 people gathered outside the headquarters of Ms Yingluck's ruling party, shouting "Get out, get out".

Hours later, the protesters dispersed peacefully from both places.

The invasion of army head­quarters deepens a conflict broadly pitting the urban middle class against the mostly rural supporters of Ms Yingluck and her brother Thaksin Shinawatra, a former prime minister who was ousted in a 2006 military coup and who remains central to Thailand's eight years of on-off turmoil.

The protesters accuse Ms Yingluck of abusing her party's parliamentary majority to push through laws that strengthen the behind-the-scenes power of her self-exiled, billionaire brother. They have rejected her repeated calls for dialogue.

Although the army moved its main command centre to a military camp in Bangkok's northern suburbs three days ago, the siege of its grounds by protesters is deeply symbolic and highlights the military's pivotal role in a country that has seen 18 successful or attempted coups in the past 80 years.

After forcing open the compound's front gates protesters swarmed inside, demanding that Thailand's generals choose sides. About 100 soldiers stood guard. Hundreds watched from the ­balconies of the 19th-century building.

"We want the head of Thailand's armed forces to choose whether they stand by the government or with the people," said Uthai ­Yodmanee, a protest leader, from the back of a truck.

Ms Yingluck has publicly courted Thailand's powerful military, which has remained neutral during this bout of protests.

"The army wishes all sides to solve the problem with the ­country's best interests in mind," said deputy army spokesman ­Colonel Winthai Suvaree.

In 2008 the military sided with protesters who helped topple two governments allied to Mr Thaksin.

In October 2008, after bloody clashes between police and ­demonstrators rallying against then-Prime Minister Somchai Wongsawat, Mr Thaksin's brother-in-law, then-army chief Anupong Paochinda, publicly urged Mr Somchai to step down to take responsibility for the violence.

Memories of that help explain why Ms Yingluck appears to have studiously avoided a confrontation during six days of protests against her government.

Police have remained restrained, separated by gates and razor wire from protesters who at times have pelted them with water bottles and shouted insults.

However, officers are braced for violence. "We have received intelligence reports that there could be violence tonight and tomorrow," the police said in a ­statement yesterday. "We are increasing security around key government and royal buildings."