With Ukrainian flags flying high and garlands of flowers in their hair, protesters marched through the heart of this city at sundown Monday.

“East and West together,” they chanted.

But in Ukraine, even such anodyne appeals to unity can be a magnet for trouble. The protesters, including old men and grade-school-age children, were walking into a trap.

The club- and whip-wielding separatists who set upon these demonstrators were just the latest proof of the disarray that has engulfed eastern Ukraine in recent weeks. The attack marked a fitting coda to a day that also featured an assassination attempt on the mayor of the country’s second-largest city and the fall of yet another government building to ­pro-Russian militants.

The militants’ campaign extended Tuesday to the eastern city of Luhansk, where men wearing camouflage fatigues stormed the regional administration building. Police did nothing to stop their advance, witnesses said.

For the residents of this normally tranquil region, it has been a shocking and sudden descent into lawlessness at the hands of shadowy forces that make their views known, but rarely their identities.

The men who attacked the pro-Kiev rally Monday evening wore black masks and wielded clubs while announcing their allegiance to Russia.

“They shouted, ‘If you don’t throw away your flags, we’ll kill you. This place is Russia, not yours,’ ” said Olga Styagunova, 43, a marcher who ducked into a bakery to escape attack.

The fate of Kharkiv’s mayor, who was shot in the back while out exercising, suggested that the separatists make good on their threats.

Gennady Kernes, known through social media as a flamboyant character , was once a staunch supporter and beneficiary of Ukraine’s pro-Russian President Viktor Yanukovych.

But after Yanukovych was ousted in February, Kernes swiveled his allegiance and forged civil relations with the new pro-Western government in Kiev. His eastern city was a hot spot for pro-Russian activists, but in recent weeks Kernes and police forces managed to retake government buildings occupied by separatists.

As of late Monday, the mayor was in critical condition, and local officials said he was “fighting for his life.”

The assassination attempt was preceded by an assault to the south, where armed militants seized a government building in another city as they expanded their pro-Russian campaign across eastern Ukraine. They now hold city halls and security headquarters in about a dozen cities and towns.

The masked men who took the building in Kostyantynivka wore camouflage and carried automatic weapons — a more serious-looking bunch than the usual citizen militias in the region, which typically carry baseball bats and metal pipes.

Meanwhile, in the breakaway city of Slovyansk, militants continued to hold dozens of hostages, including seven foreign military observers with the Organization for Security and Cooperation in Europe. Russia has called for the men to be released, but the city’s self-appointed “people’s mayor” has suggested that he intends to try to swap them for some of his allies who have been jailed by the Ukrainian government.

German Foreign Minister Frank-Walter Steinmeier said he spoke with his Russian counterpart Monday and urged Moscow to use its influence with the separatists to win the captives’ release. “It is Russia’s job to free the hostages,” he said.

Andrey Kelin, Moscow’s ambassador to the OSCE, said that it had been “extremely irresponsible” of the organization to send monitors to eastern Ukraine but that Russia would do what it could to free them.

Overall, the Ukraine Security Service said, pro-Russian separatists hold more than 40 hostages in eastern Ukraine, most of them jailed in Slovyansk.

In a statement, the agency named one leader of the separatist movement as a former colonel in the Russian army and said he was wanted for his alleged role in capturing the OSCE observers.

Another man named by Ukrainian security was a former officer in the Soviet army who had fought in Afghanistan and Chechnya and is being sought for his alleged involvement in the torture and killing of a local pro-Kiev politician.

The advocacy group Human Rights Watch said Monday that journalists and political activists are “at increasing risk of political-motivated violence, such as unlawful detention, abduction and assaults” in eastern Ukraine.

Moscow has denied playing any role in the crisis in eastern Ukraine and instead has called on the Kiev government to restore order and guarantee the safety of Russian-speaking residents in the region.

Ukrainian officials say Russia is trying to provoke its smaller and far weaker neighbor into war. With tens of thousands of Russian troops lodged on Ukraine’s eastern border, the Kiev government has been paralyzed — unable to defend itself from the growing separatist threat without risking an invasion from Russia.

That paralysis was on vivid display Monday evening as Ukrainian security forces looked on passively while the separatists clubbed the pro-Ukrainian demonstrators.

The protesters had gathered near dusk beneath a soaring statue of this city’s favorite son, Soviet pole-vaulting champion Sergey Bubka, and as they set off down a wide boulevard, the mood was upbeat. Children waved blue-and-yellow Ukrainian flags. Everyone joined in for the national anthem.

But the atmosphere changed in an instant when the crowd was ambushed by dozens of armed young men, who swung their whips and hurled molotov cocktails after blowing past hundreds of government security forces.

“Police knew that men with bats were coming, but they just let them do it,” said Oleg Saakyan, 19, a protest organizer whose ear was dripping blood. He was one of at least 25 people who were injured.

A police sergeant who declined to give his name said that he had compassion for the demonstrators but that police officers are in a difficult position.

“We support unity,” he said. “But I’m not going to get my head beaten for 2,500 hryvnia [about $200] a month.”

The rising violence and seeming inability of the state to respond have left many in eastern Ukraine feeling deeply pessimistic.

“In two or three weeks, we will lose Donetsk,” said Oleksandr Yaroshenko, a local politician who is aligned with the West. “Russia doesn’t even need to invade, because we’re so weak. We won’t be able to control these thugs.”

Alex Ryabchyn contributed to this report.