Editor's note: Hryhoriy Nemyria is former Ukrainian prime minister Yulia Tymoshenko's foreign policy adviser and the former deputy prime minister responsible for European integration.
(CNN) -- By convicting and imprisoning former Ukrainian prime minister Yulia Tymoshenko, President Viktor Yanukovych has succeeded in doing what few politicians ever achieve. He has united Europe, the U.S. and even Russia in condemnation of a Soviet-style show trial, which saw the heroine of the Orange Revolution convicted for taking a courageous political decision to end a damaging gas dispute in the winter of 2009 -- a dispute which saw gas supplies cut to European households and Ukraine's gas pipeline network come close to collapse.
This politically motivated gamble to get rid of his main political opponent ahead of parliamentary elections next year and presidential elections in 2015 backfired spectacularly. In upsetting the international community, the president also united a previously fractured opposition, cast himself as a dictator and revived the fortunes of his main political rival. Keeping Mrs. Tymoshenko in prison is simply not an option. Inside her cell her voice will merely get louder. Unwittingly he is forging a strong symbol for freedom and democracy -- an eastern European Aung San Suu Kyi.
Of course, the case is underpinned by geopolitics. At stake is the very direction of this nation of 46 million people. Russia wants Ukraine to join its customs union with former Soviet republics, Belarus and Kazakhstan. This would mean abandoning negotiations with the EU on an association agreement encompassing a wide-ranging free trade accord. The talks are due to be concluded in December.
Herein lays the rub. EU officials have made it clear that they don't invite into their club authoritarian regimes that lock up opposition leaders for no good reason. They delivered a stern warning: Mrs. Tymoshenko and other detained members of her former government are to be released and allowed to participate fully in political life, or European states are unlikely to ratify the association agreement.
Backpedaling furiously, the president hints that Ukraine's rubber stamp parliament will decriminalize the discredited Soviet-era criminal code under which Mrs. Tymoshenko was tried. She would then walk free and back into political life -- although last week parliament refused to consider any modification of the articles needed to free her.
President Yanukovych is playing a dangerous game and should not seek to bluff the U.S. and EU. He risks making his country an international pariah.
Meanwhile, the trial has shown to the world the inconsistent application of the rule of law and absence of fair, impartial and independent judicial proceedings. This should play heavily on the minds of European companies and would-be investors, as well as fans visiting the UEFA EURO 2012 soccer tournament, which Ukraine will co-host with Poland.
Yet at stake here is the country's democratic future. Under Mr Yanukovych's stewardship, Ukraine has already been demoted from Freedom House's list of "free" countries to "partly free." The choice now is whether it heads down a Belarusian path -- facing isolation and further sanctions -- or shares Mrs. Tymoshenko's vision of being European, democratic and free.
The opinions expressed in this commentary are solely those of Hryhoriy Nemyria.