(CNN) -- The Inter-American Court of Human Rights on Friday ruled in favor of Venezuelan opposition politician Leopoldo Lopez, who said the government of President Hugo Chavez unjustly disqualified him from seeking office.
"We did it, justice was done," Lopez said through his Twitter account moments after the ruling came down. "It's a triumph for all who have fought for rights and justice."
Chavez's government accused Lopez of corruption during his tenure as the mayor of the municipality of Chacao, and through an administrative procedure barred him in 2008 from running for public office for six years.
Venezuelan Foreign Minister Nicolas Maduro said that the government would study the decision before deciding how to proceed, but added that "the fight against corruption and the corrupt continues, each time more firmly."
Friday's ruling does not confer innocence or guilt regarding allegations of wrongdoing by Lopez, but found that his rights had been violated by being disqualified without out due process.
Lopez, in 2008, had been running for mayor of Caracas, the capital.
A representative of Lopez's political party held a press conference where he read excerpts from the ruling.
Among them, the court ruled that Venezuela must ensure that any government sanctions against Lopez must not prohibit him from running for office.
The ruling also states that the country's electoral officials must inscribe Lopez on an upcoming ballot if he so chooses to run, the representative said.
According to Lopez's application before the court, at issue are two accusations made against him, one in 1998 when he was an analyst for the state-run PDVSA oil company, and another in 2002 for alleged budgetary modifications while he was mayor.
Lopez wasn't the only one who was barred from running. In the run-up to the pivotal 2008 elections, hundreds of politicians were sanctioned from running, the vast majority from parties opposed to Chavez.
Although never criminally convicted, the administrative sanctions against Lopez stuck despite his repeated appeals. The case eventually ended up at the Inter-American Court for Human Rights.
Journalist Osmary Hernandez contributed to this report.