LEOPOLDO LÓPEZ is free to seek election in 2012 as Venezuela's next president. But if elected, he will be barred from taking office. Or maybe not. The government had asked the country's supreme court for a pronouncement on the “applicability” of a ruling last month by the Inter-American Court of Human Rights (IACHR), which overturned an administrative ban on Mr López holding public office. On October 18th the tribunal responded by muddying the waters.

The matter is of more than academic interest. Mr López, the leader of the centre-left People's Will party, is among the front-runners for the presidential candidacy of the opposition Democratic Unity alliance—known by its initials, somewhat ironically, as the MUD. One recent poll even showed him in the lead. In 2008, when he was on course to become mayor of greater Caracas, he was barred from standing on account of unproven corruption allegations. According to the IACHR that ban, due to last until 2014, was a breach of Venezuela's international human-rights obligations because it did not arise from a sentence handed down by a court.

That decision produced a strong reaction from Hugo Chávez, the president, who is standing for re-election. He called the IACHR “worthless”. The government condemned what it deemed interference in Venezuela's internal affairs, saying the ruling would only be applied if the supreme court found it compatible with the Venezuelan constitution—even though IACHR rulings are binding on member states, and the constitution itself, rewritten during Mr Chávez's presidency, grants precedence to international human-rights treaties.

It was therefore not surprising that the court, which has a record of dancing to the government's tune, failed to uphold the ruling. The decision, written by justice Arcadio Delgado, accuses the IACHR of acting “as if it were a colonial power” by usurping the role of Venezuela's own institutions. What did raise eyebrows was the apparent contradiction between Mr Delgado's reaffirmation that Mr López was “temporarily barred from holding public office” and the opinion expressed by Luisa Estella Morales, the court's president, at a subsequent press conference. According to Ms Morales, the court will issue a ruling on whether Mr López can take office as president if and only if he wins the election.

In effect, the supreme court is hedging its bets. By leaving open the possibility that the ban might later be overturned, its president may be signaling a willingness to facilitate a transition to a post-Chávez government if necessary. At a time when Mr Chávez was having tests in Cuba to determine whether the cancer operation he underwent in June was successful—he recently declared he is now cancer-free, but one of his former doctors said on October 16th that he probably has no more than two years to live—that speaks volumes about the uncertainty in government ranks over his political future. Suspicious commentators have suggested that the court's ruling on Mr López might even have been brought forward to distract attention from a news item that seemed certain to weaken the president.

Meanwhile, by leaving the situation unclarified, the court may also have damaged Mr López's chances of winning the MUD primaries, which are set for February 12th. Many potential voters could be put off by the fear that, if chosen, he would be less likely to win, and that if he won, he might be barred from taking office. Although Mr López himself has insisted he will stay in the race, and rival candidates have publicly supported that position, in private, some opposition members feel he should withdraw in order to minimise the damage to their cause. For the moment, however, he is at least receiving a great deal of free publicity.