ISTANBUL, Turkey -- Office workers in business suits chant anti-government slogans alongside pious women wearing Muslim headscarves. Schoolchildren and bearded anarchists rub shoulders with football fans, well-heeled women in designer sunglasses and elderly couples donating food.

These disparate groups are united by alarm at what they consider unwarranted meddling and increasingly autocratic behaviour by Recep Tayyip Erdogan, Turkey's most popular prime minister in decades. Even some of his supporters are joining the protests sweeping the country.

On Wednesday, thousands thronged Istanbul's central Taksim Square for a sixth straight day. Violent clashes broke out in the capital, Ankara, where riot police used tear gas and water cannon to subdue protesters. Nearly 1,000 people have been injured and more than 3,300 people detained since Friday, according to the Ankara-based Human Rights Association.

What started as an environmental outcry against plans to rip up trees in one of central Istanbul's last green spaces to make way for a shopping mall has burgeoned into the most widespread unrest Turkey has seen in decades.

"For the first time, it's everyone," said Beste Yurekli, an 18-year-old high school student helping to clean up garbage in Taksim Square's Gezi Park, where hundreds of demonstrators were camped out to try to prevent the bulldozers from moving in. "All of Turkey, we are united. We are one for the first time."

The reasons, she said, are clear.

"It's not just because of the trees. It's because we've had enough of the government. He's been acting like a dictator," she said of Erdogan.

Since coming to power in 2002, the prime minister's confidence has grown in tandem with his support, allowing him to win the 2011 election -- his third consecutive victory -- with nearly 50 per cent of the vote. Although he has insisted his commitment to Turkey's secular traditions are unwavering, the devoutly Muslim prime minister has moved to make religion increasingly prominent.

Erdogan draws his support mainly from Turkey's large, predominantly rural, religious conservative base. In a country where the staunchly secular legacy of the modern state's founding father, Mustafa Kemal Ataturk, has been zealously upheld, his rise to power was heralded as an end to the oppression of religious Muslims, who had been banned from overt displays of their faith, such as women wearing headscarves in universities.

But his increasingly frequent interventions into people's private lives have disturbed many. Declaring that he wanted to raise a "generation" of pious youths, he has spoken out against couples kissing on public transport, sternly advised women to have at least three children and moved to curtail the sale of alcohol and ban its advertising.

With each proclamation, the modern, mainly urban population grew more alarmed. Even religious people began to chafe at what they considered unwarranted meddling in their private affairs.

"We were in Taksim Square to resist against the authoritarian governance, police violence and to protect our park," said Fatma Dogan of the Anti-Capitalist Muslims, a civil initiative founded in 2001.

Ihsan Eliacik , another supporter of the group, said at least half of the people in the initiative have voted for the ruling party in the past.

"There are people who support the ruling party yet joined us because they think that the government should change some of its policies," he said.

With his strong support base, the protests are unlikely to pose a serious threat to the survival of Erdogan's government. But they could serve as a wake-up call that the prime minister cannot ignore the 50 per cent of the electorate who did not vote for him.

"I am a defender of the freedom to sin," columnist Mustafa Akyol wrote in the Hurriyet Daily News last week before the protests began. "What some people consider as sin, in other words, should not be banned by laws, unless the sins are also worthy of being objective crimes, with clear harm to others."

Speaking to AP Television News on Wednesday, Akyol noted that while Erdogan was Turkey's most popular prime minister in half a century, "his understanding of democracy has to become more participatory and more liberal. And he has to understand that democratically elected leaders also have limits that they should not cross, and they should also try to win the other people ... rather than intimidating them and making them more nervous."

Erdogan's plan to raze Gezi Park -- and the ensuing violent police reaction to what started out as a peaceful protest -- was the final straw for many. The prime minister's insistence that the protesters were no more than troublemakers, served only to fan the flames.

"I saw the awful images on the Internet," said businessman Bulent Peker, who describes himself as a devoted supporter of Erdogan's ruling Justice and Development Party and has voted for it in all three elections.

The protesters, he said, "were there having a picnic, protecting the trees, but their tents were burnt and they were forced out with pressurized water, which can be lethal. . My conscience was hurt."

The next day, he was among the tens of thousands who converged on Taksim Square to denounce the police crackdown and call for Erdogan to resign.

"They were people with different ideology to mine but I could not accept the fact that they were not being heard, that they were being thrown into the background," Peker said by phone from the town of Bursa in northwest Turkey.

"My feeling is that the government had to listen to what these people were thinking. It should not ignore them, or it will end up with hundreds of thousands of resentful people," said Peker, who wrote an open letter criticizing the prime minister that was published by Turkish newspapers Wednesday.

Still, he said, he would vote for Erdogan's party if elections were held tomorrow.

"Of course, my ideology won't change in one day," he said. "I support many of its other policies. On the economy, its foreign policy, what it has done about (improving) health. There is no other party that fits my views."

"But the party I want is one that brings the people together."