(Fixes typo in para 8)
* Government says avoiding confrontation
* Protesters mingle with police at flashpoints
* Army says staying out of political issue
By Panarat Thepgumpanat
BANGKOK, Dec 3 (Reuters) - Thailand's government ordered police to stand down and allow protesters into state buildings on Tuesday, removing a flashpoint for clashes and effectively bringing an end to days of violence in Bangkok in which five people have died.
The protesters, who are demanding the resignation of Prime Minister Yingluck Shinawatra, entered the grounds of Government House, the complex that houses her office, but left peacefully.
Although the protesters are still on the streets, it appears that this bout of animosty between the Bangkok-based establishment and forces loyal to Yingluck and her brother, former premier Thaksin Shinawatra, may be winding down.
Thursday is the birthday of much revered King Bhumibol Adulyadej, and the protesters are highly unlikely to continue their campaign on what is traditionally a day of prayer and celebration.
"The government is still doing its job. This morning we had a cabinet meeting as usual," Deputy Prime Minister Pongthep Thepkanchana told Reuters.
"We haven't given up, but today the police have backed off because we see the protesters just want to seize these places as a symbolic action, so we want to compromise."
He said Yingluck wanted to open talks with the protesters, academics and others to try to find a solution. She has refused to resign.
After weeks of protests that have brought clouds of teargas, rubber bullets and intermittent gunfire to parts of Bangkok, the demonstrators celebrated the withdrawal of police and the dismantling of their barricades as a victory even though the government remains in place.
At Government House, protesters mingled with police they had been lobbing petrol bombs at the day before. Crowds later strolled through iron gates into the compound waving flags.
It was a similar scene outside the city police headquarters, where officers shook hands with protesters and handed some of them roses, before this group, too, marched away, apparently headed for the Democracy Monument intersection that has been their gathering point for weeks.
"We don't want anyone to go inside and ruin government buildings," said Brenda Nong, 51, a protester from Bangkok. "We're good people. We're here for democracy."
Protest leader Suthep Thaugsuban had vilified the police in a speech to cheering supporters late on Monday and said the protesters would capture their city headquarters on Tuesday.
City police chief Kamronvit Thoopkrachang said his men would not resist the protesters.
"We have now ordered all police to withdraw. It is government policy to avoid confrontation," Kamronvit told Reuters.
Kamronvit is close to Thaksin, himself a former policeman and then a telecommunications tycoon, who became Thailand's most popular politician with policies to help the urban and rural poor.
ARMY KEEPING DISTANCE
Suthep is a former deputy prime minister of a government bitterly opposed to Thaksin that ordered the military to put down pro-Thaksin protests in 2010. About 90 people were killed.
Yingluck's government came to power with a landslide election victory in 2011.
More violence could have increased the chances of the army stepping in to restore order but ordering the police to stand down to avoid bloodshed makes the government look magnanimous.
Thaksin was ousted by the military in a 2006 coup but army chief Prayuth Chan-ocha told reporters on Tuesday the army was not getting involved this time: "This is a political problem that needs to be solved by political means. However, we are monitoring from a distance."
Thai consumer confidence has been hurt by the protests, falling in November to its lowest level since February 2012. . That, plus cancellations by tourists, could add to the problems of an economy struggling with the weakness of global export markets.
Thai financial markets have fallen sharply since the protests began more than a month ago in opposition to a government bid to introduce an amnesty that would have expunged Thaksin of a graft conviction and allowed him back from self-imposed exile.
However, the baht currency was steadier on Tuesday at around 32.20 to the dollar, while the stock market rallied almost 1 percent.
Five people have died in the violence, including one who succumbed on Tuesday to wounds sustained in weekend clashes. A Bangkok hospital said two protesters were shot and wounded on Monday. It was not known who shot them.
Thaksin's opponents hold considerable power and influence, among them wealthy conservatives, top generals, bureaucrats, royalists and many members of the urban middle class.
Many of them see Thaksin as a corrupt, crony capitalist who manipulates the masses with populist handouts and is a threat to the monarchy, which he denies.
He is adored by the poor who would be outraged to see Yingluck's government removed. Yingluck said on Monday she was willing to explore every possibility for a peaceful solution. Her party would probably win any new election.
Suthep, 64, who resigned as a Democrat lawmaker to lead the protests, wants a vaguely defined "people's council" to replace the government. Yingluck said that was unconstitutional. (Additional reporting by Apornrath Phoonphongphiphat, Kochakorn Boonlai, Martin Petty and Andrew Marshall; Writing by Robert Birsel and Alan Raybould; Editing by Raju Gopalakrishnan)