Ankara, Turkey (CNN) -- Turkish riot police used water cannons and tear gas Saturday to clear protesters camped out in an Istanbul park that has become ground zero in anti-government demonstrations targeting the policies of Prime Minister Tayyip Erdogan.
At least 29 people were injured in clashes as police took Taksim Square and adjacent Gezi Park, Istanbul Gov. Huseyin Avni Mutlu said in remarks carried on Turkish television stations.
Police pushed protesters onto side streets, where many -- with their faces covered with masks because of tear gas and smoke -- refused to leave and appeared to be reorganizing.
The move came shortly after police warned demonstrators who have occupied Istanbul's last remaining green space for more than two weeks to depart voluntarily or face being ejected.
The protest that began over Erdogan's plan to turn the park into a mall devolved into anti-government demonstrations that has seen demands for political reforms.
Erdogan said earlier in the day at a rally with supporters that if Gezi Park was not emptied, security forces would clear it.
"If it is not emptied, from now on, this country's security forces will know how to empty that place," he said.
A few minutes later, police used loudspeakers to order the protesters out of the park, saying it was their last warning.
But the demonstration continued as the sun began to set, with hundreds of people packing the square, some of them wearing gas masks, others linking arms in solidarity and anticipation.
During his speech, Erdogan said the demonstrators were not meeting him halfway. "We have reached out with our hands," he said. "However, some people returned their fists in response. Can you shake hands with those who reach out with a fist?"
And he ridiculed the protesters' assertions that they are environmentalists, calling them "thugs" instead, and citing their honking of horns as evidence of their insincerity. "This is called noise pollution," he said.
A dozen of his Justice and Development AK Party buildings have been damaged and burned, he said, accusing "outsiders" of staging the demonstrations.
He accused demonstrators of inciting sectarian violence by attacking a woman who was wearing a headscarf, kicking her, dragging her on the ground and snatching away her head cover. He accused some demonstrators of having entered a mosque while wearing shoes, drunk alcohol there and written insulting slogans on the walls -- acts forbidden by Muslims -- but said authorities had been patient.
Erdogan said the courts will handle such incidents.
He added that he did not understand the concerns about the park, since no contracts have been signed and no construction begun. "There is nothing yet to protest," he said.
Erdogan accused social media of spreading misinformation, the national media of lying and the international media of displaying "every kind of hypocrisy" in its reporting, but he expressed gratitude for the crowd's support.
He praised his government's performance over the past 10½ years, citing a rising standard of living, a stock market that has broken records, a quintupling of the central bank's reserves, plans to build the world's biggest airport and the construction of a third bridge scheduled to begin carrying traffic in four lanes in either direction over the Bosporus in 2015.
Erdogan said maintaining the park as a green space was not the real goal of most of the demonstrators, four of whom have been arrested. "What is the issue then?" he asked. "It is to take down the AK Party government." Except for a few who are genuinely concerned about the environment, the demonstrators are upset about Turkey's growing strength, he said, adding that more than 600 of his police had been wounded in the clashes.
"No one can scare us off," he said.
The festive mood contrasted sharply with the scene here overnight, when Turkish riot police sprayed rowdy anti-government demonstrators with water cannon and fired tear gas at them, arresting nearly a dozen people in the third consecutive night of clashes in the capital.
The unrest began nearly 500 kilometers (311 miles) away, in Istanbul, nearly three weeks ago, when a small group of people turned out to protest government plans to bulldoze the city's Gezi Park and to replace it with a shopping mall housed inside a replica of a 19th-century Ottoman barracks. Protesters said the plans represented a creeping infringement on their rights in a secular society.
Turkey was founded after secularists in the early 20th century defeated Islamic Ottoman forces, and many modern-day secularists frown on Ottoman symbols.
The protests broadened into an outpouring in the square and throughout the country as security forces cracked down on demonstrators. The images, seen worldwide on social media and TV, sparked criticism around the world as well as in Turkey, a NATO member and a U.S. ally.
The unrest also signaled political danger for Erdogan, a popular, populist and democratically elected politician serving his third term in office.
Erdogan has been criticized -- even by his allies -- for using heavy-handed tactics in his governance and for trying to impose changes without first seeking public input. The park plan represented the final straw for many Turks, who accuse the government of trying to impose its will whenever and wherever it wants.
On Friday, Erdogan met with protesters in Ankara and then said he would suspend plans to build the mall in Istanbul pending a court decision on the protesters' objections to its construction.
If the judicial ruling is not in line with what Gezi protesters want, a plebiscite on the park will be held.
Erdogan also agreed to investigate claims of excessive use of force by police during the protests, some of which have turned violent.
Tayfun Kahraman, a city planner speaking on behalf of the Taksim Solidarity protest movement, thanked Erdogan and his ministers for accepting their demands for a meeting.
"We will closely follow his promises and the process. Unfortunately, four people died in the incidents. We still feel the pain of their death."
Protesters in park steadfast, peaceful
Despite conciliatory statements from both sides, protesters defied the pleas of their prime minister and remained encamped Saturday in the park where the demonstrations started 19 days ago.
"This is just the beginning," Taksim Solidarity, a coalition of protest groups, said in a statement. "Our struggle continues."
Still, Gezi Park was peaceful for a third consecutive day earlier Saturday. The protesters brought in a bulldozer and dismantled a barricade constructed from scrap metal and trashed cars that had separated Gezi Park from Taksim Square for about two weeks and that, they said, was generating a bad image of the demonstrators.
Trees were being placed around a central monument, and flower beds were being replanted.
The demonstrators also sought to unify their message.
"All the banners and tents belonging to civil organizations (nonparty political, nongovernmental organizations) and parties will be removed," the solidarity group said Saturday afternoon in a statement, according to CNN Turk. "Only the tents belonging to Taksim Solidarity Platform will remain."
Protesters in Istanbul said they were pleased with the results of the meeting with Erdogan but complained that Erdogan had not responded to their demands that he free those who have been detained and drop the charges they face.
On Friday, police released 46 protesters.
Erdogan, in a speech broadcast Friday on TV, called again on people camped in Gezi Park to leave.
"We say please, come now and withdraw from Gezi Park, go to your homes."
He has repeatedly asked peaceful protesters to leave police alone with violent "illegal groups," so they may deal with them.