Weeks before Catalonia’s independence referendum on October 1, Spanish President Mariano Rajoy called the vote “illegal and undemocratic,” vowing to do everything in his power to prevent it. As images of police firing rubber bullets at voters spread across social media, it was clear Rajoy had kept his promise.

These events have raised many questions about the future of Spain. But they’ve also reignited the debate over the efficacy of referendums more generally.

The vote in Catalonia is the latest in a recent surge in referendums around the world—many of which resulted in major political upsets or backlash. In single-question ballots in the past two years, the British chose to break away from the European Union; Colombians rejected a peace deal their president had already signed with the FARC; and, although the results were invalidated because of a low turnout, Hungarians voted to close the door to refugees.

These referendums and their divisive consequences have inspired searing criticisms of the practice: the New Republic published a piece titled “Referendums are bad” and journalists at Politico explained why referendums are not very democratic.

And it’s true: referendums are flawed tools of modern-day democracies—for a number of reasons.

First, they are often initiated by leaders looking to justify their policies or quell the opposition. Hungary’s Prime Minister Viktor Orban, for instance, put the issue of banning refugees to the ballot box to demonstrate popular support for his anti-immigrant policies. Despite low turnout, Orban cited the large percentage of “no” votes as justification for pushing his mandate in Brussels.

Referendums also strip policy of its nuance by forcing complex policy decisions—normally made through extensive debate and hard-won comprises—into a binary choice straightjacket. In the Brexit vote, the simple choice between “remain” and “leave” meant that there was no room to debate the conditions of the exit or how negotiations would be carried out.

The simplistic nature of referendum questions also encourages politicians to construct crude and manipulative narratives about what each side stands for. We saw this in Colombia, where President Juan Manuel Santos depicted the referendum as a choice between peace and war. Meanwhile, his opponents portrayed the deal as a decision to either accept or reject amnesty for the guilty FARC.

Sometimes the dangers of referendums are harder to see, as subtle differences in the way questions and answers are worded can have a big impact on the results. This is particularly true in Catalonia, where a government poll showed that 41 percent of people support independence when given the choice between leaving or remaining part of Spain. But when Catalans are presented with more than two options, only 35 percent still back independence.

Despite the drawbacks of referendums—their vulnerability to manipulation, their dangerous lack of sophistication—there’s something much worse. And that’s violently denying a people from having one at all.

Madrid’s heavy-handed response to Catalonia’s referendum was a dangerous and counterproductive show of force. By arresting Catalan officials and confiscating ballots and campaign materials, the Spanish government exacerbated the country’s deep-seeded divisions and likely galvanized more ambivalent Catalans to vote in favor of independence. Moreover, the response revealed an insecure central government that feels threatened by its citizens rather than obliged to serve them.

In recent years, Europeans have lost confidence in their governments and institutions. This feeling is especially strong in Spain, where corruption is rampant. Amid these circumstances, holding a referendum can be a cathartic process for disenchanted voters, giving them a space to voice opinions and release emotions instead of keeping them bottled up. It’s a way for groups of people who feel marginalized to suddenly feel heard.

Catalonia’s call for a referendum should have been a wake-up call for the Spanish government, not a call to arms. It should have been a sign that they must do more to address the needs of their constituents. Rather than silencing those in favor of independence, Spain should engage in debates, making a compelling case for why Catalonia should remain part of Spain (beyond the fact that the country’s constitution declares the Spanish state indivisible). They could also discuss how Catalonia might remain an autonomous community with greater sovereignty.

There’s a lot we can do to improve referendums: allow more options on the ballot, counter simple and distorted narratives, mandate higher participation rates or stipulate that a win requires more than a simple majority.

But there’s still a lot democratic governments can do well before voters need to air their grievances at the referendum ballot box: they need to make sure representative democracy is working for everyone.