Correction: An earlier version of this article misspelled the last name of Myroslav Marynovych.

Anatoliy Zhalobaha didn’t pay much attention to politics, but he was angry, and growing angrier.

That’s what drew him to Kiev on Wednesday, and into the path of a sniper’s bullet on Thursday.

The uprising convulsing Ukraine gets much of its strength from places such as Dubliany, a village of 8,000 in the westernmost part of the country. But the driving force behind it is not so much about geography, or differences in language, or ideology, though those are significant factors.

For Zhalobaha, it was the raw deal he felt he had gotten in a country where those in power were brazenly helping themselves to as much as they could get their hands on.

Three months ago, Ukrainians took to the streets over a trade agreement with the European Union that did not go through, because President Viktor Yanukovych reversed course at the last moment. It was not the terms of the spurned pact that galvanized protesters; it was the idea that it offered a glimpse of Europe and of what might be, Andriy Sadoviy, the mayor of Lviv, which counts Dubliany as a suburb, said Saturday. It held out the promise of life in a comfortable, law-abiding society, free of corruption and arbitrary rule.

And then Yanukovych slammed the door shut.

That was Nov. 21. Days later, and again in December, and again in January, Yanukovych sent in the police to disperse the protest camp. Each effort was more violent than the previous one, and each one failed.

They thought people would run, Sadoviy said, but “it provoked the opposite reaction.”

“The escalation of the conflict was, every time, a decision of the president,” said Myroslav Marynovych, vice rector of Ukrainian Catholic University in Lviv. “That was the tragedy. The people had no choice but to accept the challenge.”

What he meant by that was that they fought back. And soon it wasn’t just about a trade deal anymore.

‘A patriot’ mourned

Zhalobaha was 33 and could not find steady work after an injury derailed his career as a handball player and sports instructor. Sometimes, like thousands of other job-starved Ukrainians, he could get temporary construction work across the border in Poland — in the European Union — and friends heard he had done the same for a while in Portugal.

When Interior Ministry snipers opened fire on protesters in Kiev on Tuesday, that was the signal to him that it was time to do something. A bus was taking protesters to Kiev on Thursday — the Lviv region was sending 1,000 reinforcements a day — but Vasil Popovych, the mayor of Dubliany, said Zhalobaha found one going that night from Lviv and got on it.

Twenty-four hours later, Ihor Tylipskiy, a long-haul truck driver, got a call from his brother, who was in Kiev and working on a detail that brought killed and wounded defenders of the Independence Square, or “Maidan,” protest away from the front lines. One of those he carried was Zhalobaha, and he was dead.

The two had gone to school together — Zhalobaha was the handsome class leader, the guy who could organize things, make people follow him, a natural athlete. But the hard and unfair life in Ukraine, Tylipskiy said, had finally brought out the bitterness in him. They last saw each other in June.

Those who joined the fight with the police in Kiev were called criminals and terrorists by the government — and by Russian officials, who supported Yanukovych.

“We are not burying him as a bandit or an extremist — we are burying him as a patriot,” Tylipskiy said as he stood at a rain-soaked memorial service here in front of a faded yellow city hall, a relic of the Austro-Hungarian empire that once ruled the region.

About 1,000 mourners were gathered as a priest said a liturgy over the open coffin.

“People want to pay their respects to someone who did what everyone should have done,” said another former classmate, Andriy Riznychenko. “He paid the price for all of us.”

Halyna Moskalets had been Zhalobaha’s teacher for three years. After she learned he had been killed, around lunchtime Friday, she said, she waited the rest of the day for the call saying it had been a mistake. It never came.

“He was kind, dedicated to his country, a warmhearted boy,” she said. She will be proud, she said, to tell her future students that she once taught a true patriot.

The opposition likes to point out that it has support to some degree from all over the country, from Russian speakers in the industrial east as well as Ukrainian speakers here in the west. It casts the protest as a fight against the lawlessness, brutality and corruption of the government, not against fellow Ukrainians.

But Lviv, a pearl of an old city, has been a stronghold closely identified with the opposition. Mayor Sadoviy draped the city hall with a large banner that says, “A free city of free people.” The E.U. flag is everywhere.

Yanukovych had broad though not passionate support in eastern and southern Ukraine, and people in those regions tend to see Lviv and its surroundings as an area populated by die-hard nationalists who despise their fellow countrymen for being too friendly with Russia and too wary of Europe.

Sadoviy said neither a breakup of the country nor its transformation into a federation of autonomous parts can be accepted. “Our unity is our strength,” he said.

But that unity may be hard to find in the days and weeks ahead. Yanukovych’s supporters are unlikely to accept a “western Ukrainian narrative” that ignores significant parts of the country, said Dmitri Trenin of the Carnegie Moscow Center.

Show them the truth, Sadoviy answered. Let independent television compete with the propaganda of Russian channels that are currently the main sources of information in the east, he said. People will come around, he said.

What comes next

Much will depend on how the turmoil that has been let loose is finally corralled. In Lviv, where uniformed police have vanished, 2,000 volunteers are carrying out safety patrols (joined, Sadoviy said, by 200 police officers in civilian clothes).

Across the country, militants armed with table legs and baseball bats have set up checkpoints, searching cars for fleeing politicians and “titushki,” young men hired by the government to spread mayhem.

The most aggressive element of the opposition is a group calling itself Pravy Sektor, a right-wing nationalist organization that critics liken to Nazis.

It was Pravy Sektor that took the initiative in January as political leaders of the opposition wavered and came under criticism for inaction. Its helmeted members marched off the Maidan in Kiev and entered into a street battle with police a few blocks away.

They seized the initiative, and that moment paved the way for the much deadlier violence, and then governmental collapse, of this past week.

What to do about Pravy Sektor now is a problem. Sadoviy said that the new interior minister has to try to establish communication with them and channel their energy in legal directions. It could be a daunting task, now that so much blood has been shed.

Ukraine has to let itself down from the shock of recent days, Marynovych said. “The only problem is to come back to our senses. The Ukrainian situation will change dramatically, and very fast.”

He is confident, he said, that people in eastern Ukraine, where the local politicians were all loyal members of Yanukovych’s Party of Regions, will be transformed.

Easterners were intimidated, he said. “They were forced to accept this criminal power,” he said. “We have to liquidate this fear. You have to understand the psychology of fear.”

A lecturer at Marynovych’s university was in Kiev this past week. Bohdan Solchanyk, 28, helped to run summer camps and was active in amateur theater. He had gone to the Maidan with a group of his students, one of whom identified him after he was shot and killed Thursday.

“He studied and taught recent history, and then he became an actor of history,” Marynovych said.

Of the 82 people who died in the fighting, 13 were from Lviv. Most will be buried Sunday.

“People need to open their hearts to the good,” Sadoviy said. “There is hatred out there.”

Anatoliy Zhalobaha lay in his coffin Saturday, in the rain, draped with a Ukrainian flag, and with an army-green helmet resting on his shins. The crowd filed past for a last look.

He could not have known on Thursday, amid the flames and smoke of molotov cocktails and the crackle of gunfire, that his foes would unravel so quickly. He died in anger.