As they chanted, police officers casually put on their gas masks and the operators of the tanklike vehicles aimed their big guns, which fire a mixture of water and tear gas, at the group. Then chaos erupted. Protesters and onlookers, some of them tourists, ran down side streets where shopkeepers offered sliced lemons to soothe the burning sensation of the gas, and pharmacists doled out ointments for skin burns.

“The pigs, the pigs,” said Esra Yurtnac, who was crying as she sought refuge in a bakery after being gassed. “All they know is how to use gas.”

She added, “They think they can silence us with force, but they won’t.”

Hours after the clashes with protesters, an Istanbul court on Friday ruled in favor of a petition by a local advocacy group and halted the project until parties submitted their legal arguments to court, the semiofficial Anatolian News Agency reported. The interior minister also pledged on Friday that claims of excessive force would be investigated.

The chaos followed a dawn raid on an Occupy Wall Street-style encampment in Gezi Park, near Taksim, in which the police also used tear gas to drive away protesters and later barricaded the park. In an earlier raid on the camp, on Thursday, the police set fire to some tents. The brief occupation of the park, which began after bulldozers had started to take down trees, had taken on a festival-like atmosphere, with yoga, barbecues and musical performances, while those gathered chanted, “Taksim is ours! Istanbul is ours!”

The people adorned the camp with banners expressing the rising anger at the reshaping of Istanbul’s urban spaces by the government. One read, “Don’t touch our neighborhood, our squares, our trees, our water, our soil, our homes, our villages, our cities and our parks.”

Another referred to Mr. Erdogan and the growing number of shopping malls being built around the city. “Let all shopping malls crumble and let Tayyip get crushed by their rubble,” the banner read.