As with so many seemingly intractable fights, the warring camps that have paralyzed Thailand both say they want the same thing: a cleaner, more legitimate democratic process. It’s time for them to prove it.

The country’s long-running political soap opera has lately taken a darker turn. The ruling Pheu Thai party of Prime Minister Yingluck Shinawatra has vowed to forge ahead with elections on Feb. 2, which the opposition promises to boycott. A 60-day “state of emergency” in Bangkok and surrounding areas has raised the prospect of violence between police and protesters. Under such conditions, a victory at the polls would leave a new Pheu Thai government with a dangerously weak mandate, increasing the likelihood of intervention by the army or the king.

Both sides protest their innocence. Yingluck, the sister of controversial tycoon and former Prime Minister Thaksin Shinawatra, has offered to discuss electoral reforms, but insists they can be enacted only by a new legislature. Her opponents demand that her government be replaced by an unelected group of “wise men” who would carry out reforms over the next 18 months, before overseeing any new vote. It might be easier to sympathize with one side or the other if both had not ignored the recommendations of a multitude of reform commissions while in office over the past decade.

One idea raised recently would be to form a small body -- including members of both Pheu Thai and the opposition, as well as third-party figures -- to hash out a half-dozen crucial political reforms, such as checks and balances on state power and measures that would reduce corruption and increase fiscal discipline. Although discussions would begin immediately, the commission’s work would continue past the Feb. 2 elections, no matter who wins. Parties would commit in advance to implementing the body’s recommendations -- or to calling new elections if the commission judged they were needed.

If the parties are sincere in their claims, they should be looking for just such a middle ground. Even if they’re not, however, some agreed process would at least allow both to climb down from a confrontation that neither can win outright.

Assuming that, as part of such a compromise, the opposition agreed to participate in elections, the Feb. 2 vote could even be postponed for a couple of months to let tempers cool and give candidates time to campaign properly. (Rescheduling the vote would be extremely difficult constitutionally but perhaps not impossible.) The pause would be meant not to circumvent the democratic process -- a fair description of the opposition’s current demands -- but to bolster the legitimacy of the results.

Yingluck need only look to her embattled counterpart Sheikh Hasina Wajed, prime minister of Bangladesh, to see that winning an uncontested election marred by violence would be no victory at all. To plow ahead, using her draconian new security powers to detain opposition leaders and disperse protesters, would treat only the symptoms of Thailand’s malaise, not the cause.

By the same token, for the opposition to continue to reject any compromise would prove what many suspect -- that its main goal is to regain power for Thai elites, who have lost their electoral majority to poorer rural citizens from the populous north. Ordinary Thais and elites alike have plenty of reason to criticize Pheu Thai’s stewardship of the economy. Sooner or later, opposition leaders will have to learn to beat their opponents with better ideas, not by rigging the system.

The alternatives to compromise now are a disputed election or a coup, either of which would keep the conflict going. Vague hints from top generals about the possibility of a military takeover damage Thailand’s economy and further dim its appeal as an investment destination. The country would be better served if both king and army -- the two most powerful forces in Thailand - - used that leverage to push the two sides toward the middle ground they seem unable to find on their own.

To contact the Bloomberg View editorial board: view@bloomberg.net.