What just happened in my country is likely making autocrats around the world nervous.

I have worked on democracy programs in Armenia for 20 years. But even I was surprised that so many of my fellow citizens took to the streets to protest after Serzh Sargsyan, the longtime authoritarian president of Armenia, had himself declared prime minister, an act that shredded any pretense of following democratic norms.

In a dizzying period, beginning in April and culminating in early May, ordinary Armenians expressed collective rage over Sargsyan’s power grab. The uprising forced him to resign and created the conditions that allowed Nikol Pashinyan, a democracy activist and opposition party member, to be named prime minister instead.

To understand why these developments in relatively small Armenia might be so unsettling to the authoritarian leaders in Budapest, Warsaw, Moscow, and elsewhere, consider the poor, undeveloped, state of the democracy movement in Armenia prior to this “bloodless revolution.”

I can tell you from firsthand knowledge that Armenia, prior to the events this spring, was not a vibrant center of democratic activism. Indeed, before the revolution, my colleagues and I were pursuing a long-term strategy, channeling Open Society Foundations grants to youth groups in the hopes of creating change—such as more transparency and a more representative government—over a generation.

The widespread belief, as recently as a few months ago, was that Armenians are fiercely proud of their history and their culture but mostly indifferent to democracy. There was ample evidence to support this view. A dishearteningly large percentage of people would sell their votes, rather than support opposition parties or lodge a protest vote on election day. Further, there was limited support for activism. Those of us who stood up for democracy and human rights were not paid significant attention by the general population.

Meanwhile, young people were desperate to leave. One in three people had left Armenia since it became independent in 1991. It felt at times like my fellow Armenians had given up on their own country. And yet, just a few weeks ago, hundreds of thousands of Armenians poured into the streets, and with what felt like one voice, they demanded a more responsive, more representative, more transparent government. They wanted democracy badly. So badly, in fact, that many were willing to risk their lives—performing acts of civil disobedience—to get it.

“This is a remarkable shift in Armenian politics,” Laurence Broers, an associate fellow at the Chatham House’s Russia and Eurasia program, told CNN. “The desire for change is coming from within. It is coming from the Armenian streets, from the ordinary citizens.”

While it may have been surprising, there is a logic behind all these events, a logic that speaks to some basic truths about the nature of democracy and the sad realities associated with maintaining an authoritarian state. For dictators everywhere, there comes a point when their turn-the-screws approach to governing creates significant blowback that is difficult to control. To stay in power, Sargsyan, and others who rule like him, have to continually apply pressure. Eventually, that pressure blows up in their faces.

In Armenia, the promise of democracy spread like a wave. And protest organizers did a masterful job of encouraging all Armenians to join up in even the smallest ways. Motorists were encouraged to honk their horns by protesters holding signs saying, “Honk if Serzh must go.” My coffee shop offered its patrons a new Wi-Fi password: SerzhMustGo. The banging of pots at home, at night, was similarly encouraged as a form of protest. These small acts, collectively, created a sense of unity and of deep support for the protesters’ demands.

Like most, I was thrilled to witness the Armenian people’s commitment to seeing their demands for democracy met. A pivotal moment came soon after Sargsyan stepped down, when his political cronies were poised to appoint a new leader who would rule in the same manner. But here, too, the Armenian people responded by flooding the streets and shutting down Yerevan.

It felt like protest was everywhere. Media outlets estimated an astonishing 96 percent of the city’s streets were impassable. The streets leading to the airport were barricaded. You couldn’t get to government buildings.

“In practice, it felt more like a nationwide street festival,” Mica Hilson wrote in Slate, “as Armenians played music, performed folk dances, and even grilled barbecue in the middle of normally busy intersections. Photos of the festivities circulated on social media under the tagline “Armenian Style of Revolution.” All this joy—in the photos, the dancing, the grilling, and the smiling—reflected the fact that the Armenian people, for the first time in a long time, were in touch with their own political power.

At one point, the regime in Armenia reacted as most do when threatened by a dissident movement on the street: they tried to crush it. More than 1,000 protesters were arrested, including Pashinyan and other leaders of the movement. This was a defining moment. One might have expected riots, which is exactly the sort of chaos that leaders like Sargsyan cite to justify their iron-fisted law and order approach.

But instead of rioting, the protesters remained true to their ideals. They practiced nonviolent civil disobedience and refused to get sucked into a back and forth with security forces, which could have divided the country.

Thousands rallied to the site where Pashinyan was held. Within hours, he was freed. Less than two weeks later, the magic of the “Armenian Style of Revolution” was on display, as Pashniyan was confirmed as prime minister, and as the protesters, who had recently faced security forces in riot gear, hugged and posed for photos with police. In Armenia, these days, it feels like nearly everyone is embracing democracy.

So what now?

I don’t believe we are under any illusion that democracy will suddenly provide all the solutions to the many challenges Armenia faces. But people are engaged in ways which they have never been before. In the near term, this engagement—combined with more compassionate, open, public service-oriented government leadership—could lead to profound changes in basic government programs such as education, health care, and the criminal justice system.

We have accomplished a great deal, but we recognize that we have only just begun this journey. Going forward, I am hopeful that democracy activists in other parts of the world will study what happened in Armenia. I believe that the powerful force that is the promise of democracy can be harnessed, as it was in my country, to force other autocrats out of office—and to bring about changes to dramatically improve the lives of ordinary people.