Maybe it’s a sign of the power of globalisation, or maybe it’s just a remarkable coincidence, but this week anti-government protests on opposite sides of the world are showing some truly amazing similarities.

In Kiev, protesters are demonstrating and trying to occupy government buildings to force the ouster of the government of Ukrainian President Viktor Yanukovych and his Prime Minister, Mykola Azarov. In Bangkok, protesters are demonstrating and trying to occupy government buildings to force the ouster of the Thai government led by Prime Minister Yingluck Shinawatra.

In each case, the protests started out peacefully and have escalated.

Violence has not got out of control in either country, but the signs are ominous. Four people have died so far in Thailand; no deaths have been reported in Ukraine, but “dozens” were injured on Sunday when protesters stormed city hall.

In both cases, the protests are nominally led by new, spontaneous organisations, but in reality are heavily supported by the existing “official” opposition. Mass action in the streets has been co-ordinated, at least to some extent, with more traditional manoeuvres in Parliament.

Neither is a case of “mob” violence, of the poor and dispossessed rising up against their rulers. In each case the protesters come from a broadly “liberal” political tradition, representing the educated middle class — and for that reason seem to get a better run from Western media than most protesters do.

Not surprisingly, both cases show a major difference of perspective between government and opposition. The government in each case sees itself as the defender of order and legality, besieged by fundamentally anti-democratic forces. The opposition, by contrast, sees itself as the authentic voice of the people standing against corruption and oligarchy.

In neither case is there a reason to question the sincerity with which those views are held.

Both sets of protests were set off by a specific policy grievance. In Thailand it was the proposed amnesty bill, which would, among others, have benefited the Prime Minister’s brother, exiled former leader Thaksin Shinawatra. In Ukraine it was the government’s failure, under Russian pressure, to sign an agreement of association with the European Union at last week’s Vilnius summit.

But in each case the protests have acquired a wider aim, of overthrowing and replacing the government as a whole. And although the policy issues were real and important, and have no doubt brought many new recruits to the opposition, in each case the core of the opposition consists of those who were against the government from the start.

Both governments have responded so far with restraint and a professed willingness to negotiate, but in neither case is there much hope that negotiations are likely to solve anything. The intransigence of the opposition in each case seems to be leading to a situation where, unless some circuit-breaker can be found, further violence is inevitable.

Although the grievances are political, in each case they have a clear ethno-social foundation. Ukraine’s opposition is strong in Kiev and in the more Westernised districts of the north and west of the country, where better relations with the EU are a clear priority. Yanukovych’s power base is in the industrialised south and east, where Russian influence is stronger and many people identify as Russian rather than Ukrainian.

In Thailand, the opposition Democrat Party is strong in Bangkok and in the south of the country; Yingluck’s party, despite winning a clear majority at the 2011, won no seats at all in the south. Her strength is in the poorer rural districts of the north and north-east, where her brother’s populism has delivered repeated electoral victories.

But neither country has the sort of deep ethnic division associated with, say, Kosovo or Nigeria. The actors on both sides are driven by comprehensible political motives, not by deep-seated antagonisms.

Each protest movement operates in a historical context, hoping to repeat a prior success. The inspiration for the Kiev protesters is the “Orange Revolution” of 2004, when Yanukovych was prevented from taking office following a rigged election. Thailand’s opposition looks to the “yellow shirt” protests of 2006, which eventually led to the removal of Thaksin’s government by a military coup.

And that leads to the major difference between the two countries — and why, as a Westernised liberal myself, I feel sympathy with the protesters in Kiev but much less for those in Bangkok.

The aims of the Ukrainian protesters still seem fundamentally democratic. They would be content with forcing fresh elections, and since closer ties with the EU are a popular cause, they would be well placed to take power. For that reason, Azarov and Yanukovych are keen to avoid that outcome, although they may come to see it as their only option (and it’s still quite possible that a reaction against extra-parliamentary violence would work in their favor).

But in Thailand, the opposition seems to have given up on democracy. Yingluck has resisted the temptation to call a fresh election, not so much because she fears defeat but because it seems clear that it would not actually solve anything. Her opponents are demanding not an appeal to the electorate but a direct transfer of power to themselves — in the name of “the people”, of course.

This is dangerous territory. In 2010, when the Democrat Party was in power, a crackdown on demonstrators killed dozens and injured hundreds.

Those who call themselves liberals should know better than to rely on the military — as I put it on that occasion: “When you lose faith in the rule of the ballot box, you end up sooner or later in the hands of the men with guns.”

Let’s hope that in both cases it’s the ballot rather than the bullet that has the ultimate say.