BANGKOK (AP) — The leaders of Thailand's anti-government protest movement appeared at a Bangkok court Monday and pleaded not guilty to terrorism charges, while the government lifted a state of emergency in three provinces but kept the decree in place in the capital.

Shackled at the ankles, 17 so-called Red Shirt protest leaders denied all charges against them in a preliminary hearing at the Bangkok Criminal Court. They are accused of inciting violence, threatening government officials including the prime minister and committing terrorism during 10 weeks of protests and clashes with the army earlier this year that left 91 people dead and 1,400 injured.

The next hearing was set for Sept. 27. Conviction on terrorism charges is punishable by a maximum penalty of death.

Most of the protest leaders have been in detention since the demonstrations ended May 19 after an army crackdown. Authorities were searching for six other suspects, including former Prime Minister Thaksin Shinawatra, who was deposed in a 2006 coup and is accused of supplying funding for the protests from his self-imposed exile abroad.

Under tight police security, the protest leaders were led from a prison bus into the court as a small group of red-shirted protesters cheered. Under the state of emergency, political gatherings are prohibited.

"These are political charges," Korkaew Pikulthong, one of the protest leaders, told reporters.

A state of emergency was initially declared in April in Bangkok after demonstrators broke into the Parliament building to press their demands for early elections. It was later extended to cover almost one-third of the country's 76 provinces and has gradually been lifted in most locales.

Prime Minister Abhisit Vejjajiva lifted the decree Monday in the northern provinces of Chiang Mai and Chiang Rai and the northeastern province of Ubon Ratchathani, said Tawin Pleansri, head of the National Security Council. All three areas are known to support Thaksin and the anti-government movement.

The government has kept the decree in place in Bangkok and six other provinces citing security concerns in the wake of the protests.

A state of emergency allows the government to impose curfews, prohibit public gatherings, censor and ban publications, detain suspects without charge, confiscate property and tap telephones, among other provisions. Critics say it is selectively enforced and used to harass government opponents.

Thailand has faced political instability since the 2006 coup that ousted Thaksin. Thaksin's supporters and opponents have vied for power, staging sometimes-violent street protests. In 2008, anti-Thaksin protesters occupied the prime minister's offices for three months and seized Bangkok's two airports for a week.

In contrast to the speedy prosecution of Red Shirt leaders who claimed to champion the rights of the poor, none of the rival protesters known as the Yellow Shirts have faced prosecution. The Yellow Shirts are widely believed to have backing from the powerful military and monarchy.

"This preferential treatment is a time bomb," said Prompong Nopparit, spokesman for the main opposition party. "It takes less than three months to detain and then charge Red Shirts, but two years have passed and there's not a single arrest warrant for leaders of the (Yellow Shirts)."