This eastern Ukrainian city took another step toward mob rule Thursday as stone-throwing and stick-wielding pro-Russian separatists stormed the state prosecutor’s office and forced dozens of riot police deployed to guard the building into a humiliating surrender.

The attackers were backed by a crowd of a couple of thousand men and women of all ages. They chanted “fascists” and “traitors” at the riot police and waved Russian flags, as well as the flag of the self-styled Donetsk People’s Republic.

Arriving at the prosecutor’s office, the mob ripped up stone walls at a nearby park to make rocks to use as projectiles. Some wearing black balaclavas, they smashed windows and quickly forced the riot police on the steps of the building to retreat inside, seizing some of their shields as they did so.

Gunshots and small detonations rang out, and clouds of tear gas enveloped the building as the struggle continued inside. At one point, a Ukrainian armored personnel carrier approached the building in an attempt to relieve the siege but swiftly retreated when the mob turned in its direction.

Later, a group of policemen cowered outside the building, crouched on the ground with their shields held over their heads, before finally surrendering. Stripped of their riot gear, they were led away through the crowd, their heads bowed as some separatists struck them.

An elderly woman carrying a small Russian flag on a pole shouted “parasites” as one policeman was put into an ambulance, while others in the crowd bayed for blood.

“They beat our guys! We should beat them, too. We should put them on their knees," a man and a woman yelled. But a pro-Russian activist in a riot helmet defended the police. “They are just officers on duty, doing their job,” he shouted back.

A song called “The Russians Are Coming” blasted from the speakers of a car, as well as another popular song written during the Soviet war against Nazi Germany. The car flew a flag carrying an image of World War II-era Soviet leader Joseph Stalin.

Men with close-cropped hair and tattoos stood triumphantly on the steps of the captured building, banging confiscated batons on riot shields in unison as the crowd chanted “bravo.” Some carried pistols. A Ukrainian flag and plastic trident, the national emblem, burned in a small bonfire close by, along with scraps of wood and a pair of women’s high-heeled shoes.

Inside the building, looters grabbed items ranging from legal files to hard drives.

“For 23 years I wanted to be in the Soviet Union,” said a 35-year-old miner who gave his name only as Sergey. Asked why, he said: “I don’t want to live with gays.” Later, Sergey, who came to the demonstration with his wife and son, stood among the crowd with a rock in his hand.

Regional authorities said 15 people sustained injuries, including gunshot wounds, but did not specify whether they were police or demonstrators. One elderly woman complained that she had seen a demonstrator hit by a rubber bullet fired by the police.

The state prosecutor, a main target of the demonstrator’s ire, was appointed by the national government in Kiev two months ago. He was investigating corruption charges against pro-Moscow former president Viktor Yanukovych, who was ousted in February after street protests in the capital and fled to Russia.

The Donetsk region of eastern Ukraine was the heartland of Yanukovych’s support, and Thursday’s violence appeared partly orchestrated to prevent any investigation into the sources of his wealth here, as well as to attack a symbol of Ukrainian rule.

The demonstration, on International Workers’ Day, also known as May Day, began under a huge statue of another former Soviet ruler, Vladimir Lenin, before moving to the city’s main police station. There, demonstrators forced the police to hang the flag of the Donetsk People’s Republic outside the building. They demanded that police free seven separatists who were arrested the day before in what police said was an attempted bank robbery.

Demoralized, corrupt and poorly paid, the police in eastern Ukraine have been caught in the middle of the region’s separatist uprising and have attracted the scorn and anger of both sides.

On Monday, riot police in Donetsk stood by and watched as a pro-Russian mob attacked a peaceful rally in which about 1,000 marchers called for Ukraine to remain united. The city council denied permission for another pro-Ukrainian rally on Tuesday, ostensibly because it represented a “threat to the people” of Donetsk, according to a letter seen by The Washington Post.

On Tuesday, the main police station in the city of Luhansk, capital of the neighboring region of the same name, was also stormed by a separatist mob and its windows smashed. Police requested instructions from Kiev as the mob gathered outside but did not receive any orders and ultimately had no choice but to give in, a police spokeswoman was quoted as saying.

Ukraine’s acting president, Oleksandr Turchynov, said this week that the police were “helpless” to protect citizens and in some cases were actively colluding with pro-Russian insurgents.

Anna Nemtsova and Alex Ryabchyn contributed to this report.