Diplomats recently initialed a landmark agreement intended to draw Ukraine closer to the European Union, but the continued imprisonment of two major opposition leaders is pushing Ukraine further from its European aspirations.

In the coming months, Ukrainian President Viktor Yanukovych must choose between consolidating power through undemocratic means and advancing his nation’s European aspirations. By ending selective prosecutions, pardoning imprisoned political leaders without conditions, and ensuring free and fair elections this fall, Yanukovych could become the leader who anchors Ukraine to Europe. If he fails to do so, he will be yet another politician to disappoint Ukrainians.

As part of a Freedom House mission of American and Ukrainian analysts to examine the state of democracy in Ukraine, I visited former prime minister Yulia Tymoshenko and former interior minister Yuri Lutsenko in Kachanivska and Lukyanivska prisons, respectively, this month. Our group was Tymoshenko’s first visit from independent observers since December; we were the second independent group to see Lutsenko since his incarceration.

Neither I nor my colleagues are advocates for Tymoshenko or Lutsenko. Rather, our visits sought to underscore the larger point that criminalizing political differences erodes democracy in Ukraine and undermines its European aspirations. These former officials are in prison as a result of what the White House and European Union have called “selective prosecutions” against the ruling party’s political opponents. Tymo­shenko and Lutsenko are formidable leaders whose incarceration on questionable charges removes them as potential challengers to the government.

Tymoshenko was pale, weak and unable to sit up. While lying down, she told us that Ukrainian authorities were trying to “destroy” her through physical and psychological pressure, to remove her as a political threat. She believes that she is the target of a smear campaign, and reports surfaced while we were in Ukraine of her alleged involvement in a decade-old murder. Despite her condition, her steely demeanor evinced her intention to remain a force in Ukrainian politics even behind bars. But most urgently, she requires sustained medical attention from doctors she trusts.

Like Tymoshenko, Lutsenko welcomed our visit as a means to keep international attention on the state of democracy in Ukraine and to secure better medical care. He rejected any hints of an offer of political exile in exchange for his freedom. Both former officials have placed great hopes in a European Court of Human Rights hearing this month on whether their detentions are illegal.

Last month, as these leaders sat in prison and Ukrainian authorities announced plans to bring new charges against them, negotiators initialed the E.U.-Ukraine Association Agreement. The pact includes a deep and comprehensive free-trade agreement. Yet the European Union is unlikely to sign and ratify the agreement as long as Tymo­shenko, Ukraine’s most prominent opposition leader, remains in prison or before parliamentary elections this fall, a critical test of this government’s willingness to conduct a free, fair vote.

The Ukrainian government is pursuing contradictory policies: It seeks to integrate Ukraine into Europe while emasculating its domestic opposition. In their first two years in office, Ukrainian authorities have made progress on both fronts. Ultimately, though, they must choose.

Ukraine’s choice is not between Russia and the West. That is a false choice. Indeed, Yanukovych has courageously challenged President-elect Vladimir Putin’s plan to assert control over the states of the former Soviet Union through a Eurasian Union. The question is whether Ukraine sees its future in the European mainstream or relegated to the borderlands.

It is not too late to take the democratic path. The government has made some progress in the past year, including enacting legislation that allows nongovernmental organizations to be active on civil-political issues without being considered political actors and to accept foreign funds in a transparent manner; advancing a more modern criminal procedure code; and increasing public access to government information. But it must do more. The government’s first step should be facilitating independent medical care for Tymoshenko and Lutsenko. Ukraine can avoid international ostracism, and perhaps even U.S. and E.U. sanctions, by respecting the independence of the judiciary and allowing all opposition figures, including those in prison, to contest parliamentary elections in October.

Ukraine teeters between Eurasian malaise and an ambivalent Europe. As long as the government in Kiev criminalizes political differences, it will find itself in control at home but increasingly isolated internationally.

U.S. and European policy should make clear that a democratic Ukraine that makes the right choices is welcome as a member of the transatlantic community.

Damon Wilson is executive vice president of the Atlantic Council and a member of Freedom House’s Ukraine assessment mission. The Freedom House group plans to issue a report in June. This piece originally appeared on The Washington Post.