Image copyright EPA Image caption President Tsai Ing-wen's DPP framed the vote as one between freedom or a Chinese takeover

Taiwan is often hit by earthquakes, but over the weekend it was shaken by a political one.

In a series of local elections, the ruling pro-independence Democratic Progressive Party (DPP), which came to power in 2016 in a landslide victory, lost more than half the cities and counties it held and is left with only a handful.

The China-friendly former ruling party Kuomintang (KMT) made a dramatic comeback, winning 15 of the 22 cities and counties in Taiwan.

The result is a major upset for President Tsai Ing-wen, who has resigned as party leader, and could indicate a victory for the KMT in 2020's presidential and parliamentary elections.

China has leapt on the outcome, saying voters rejected Ms Tsai's "separatist stance". But the reality is not so straightforward.

Taiwanese prefer the middle ground

To the outside world, it seems like Taiwan faces one overwhelming choice - independence from or eventual unification with mainland China.

But surveys have consistently shown that Taiwanese people prefer not to have to choose between one or the other; instead they favour the middle ground.

While they believe their island is an independent country and would like it to be treated as such, most people don't believe formal independence is achievable any time soon and prefer not to have damaging relations with Beijing.

The ruling party DPP lost so badly on Saturday because it framed the vote as one between freedom or a Chinese takeover.

And voters - more concerned about a struggling economy - didn't buy it.

Since the DPP came to power, the relationship with mainland China - which is becoming increasingly assertive - has significantly deteriorated.

Image copyright AFP/Getty Images Image caption The Kuomintang has made a dramatic comeback

Voters remembered that under the previous China-friendly administration, Taiwan enjoyed unprecedented good relations with China - without losing an inch in sovereignty, democracy and independence.

In fact it gained - by getting along with China, it was able to participate in many more international activities reserved for countries while also reaping the benefits of China's economic growth.

Second chance for the KMT?

The issue over Taiwan's sovereignty is a complicated unresolved remnant of history dating back more than a century and, to be fair, Chinese people have as much right to want unification as Taiwanese people do to want independence.

Taiwanese voters outside the fringe extremes want to focus on what the two sides can co-operate on and let time resolve this matter.

They know that China does not want to attack and has no timeline for reunification, and they are confident in Taiwan's democracy. That's why an overwhelming number of voters opted for the KMT's candidates.

They know the KMT can work with China and build peace between the two sides and that this would help the economy.

That's not to say they completely trust or even like the KMT. They are worried its pro-business and pro-unification stance could make the island too dependent on China economically and risk Beijing having too much influence over Taiwan's affairs.

But they'd rather give the KMT a second chance than continue on the current path of constant conflict with China and a potential war.

War of words

China has interpreted the voting results as a desire by the Taiwanese to work with the mainland for the joint prosperity of both sides.

A Chinese spokesman was quoted by the Xinhua news agency as saying the results "reflected the strong will of the Taiwanese public in sharing the benefits of the peaceful development across the Taiwan Strait, and desires to improve the island's economy and people's wellbeing".

He added the mainland will continue to "follow a path of peaceful development of cross-Strait relations."

A state-run newspaper had a stronger reaction.

"The election shows that the Tsai administration has betrayed Taiwan's interests and become a troublemaker whose actions have drifted farther away from the practical needs of the Taiwan people and the historical truth of the consensus there is only one China," said an editorial in state newspaper China Daily.

Image copyright AFP/Getty Images Image caption Some Taiwanese vocally support formal independence but most favour the middle ground

Taiwan's current government quickly warned China to not over-interpret the election results to its own benefit and reiterated its stance that the current state of relations is all China's fault.

The DPP is unlikely to change course and start cosying up to China.

So unless it can bring about a dramatic (and unlikely) turnaround in Taiwan's economy it risks losing the 2020 presidential and legislative races, and tense relations can be expected in the short term.

One lesson that perhaps the KMT has learned and the DPP should learn is that if they push Taiwan toward a path that would lead to merging with China or potential conflict with the mainland, they risk losing elections.

A mother of two young boys told me outside a polling station that she supports neither independence nor unification, and she doesn't want war between the two sides; she just want more opportunities for Taiwanese people's lives to improve.

Like people around the world, the Taiwanese voted for peace and prosperity.