He was once one of the most powerful figures in Brazilian politics, right-hand man and heir apparent to former president Luiz Inácio Lula da Silva.

However, former minister José Dirceu has been sentenced to nearly 11 years in prison for orchestrating a vote-buying scheme in the country’s congress.

The former guerrilla leader and co-founder of the Workers Party is the most high profile of 25 people convicted by the supreme court in Brazil’s so-called “trial of the century”, the climax of which has stunned Brazilians who had long become resigned to flagrant political corruption going unpunished.

Those convicted were found guilty of various crimes stemming from the so-called mensalão (big monthly payment) scandal which came to light in 2005. The court found that stolen public money was recycled as illegal monthly payments for members of congress to secure their support for President Lula’s agenda.

Judge Joaquim Barbosa, who wrote the majority ruling published on Monday, said Mr Dirceu commanded the scheme which “put at risk the proper democratic regime, the independence between powers and the republican system in flagrant contradiction of the federal constitution”.

Mr Dirceu (66) will have to serve at least one year and nine months in a closed prison before he can request a transfer to a semi-open regime in which he will not have to spend nights in jail. In a note posted on his blog after sentencing, he again declared his innocence saying he would “not shut up” and promised “to fight on even while serving the sentence”. Also sentenced to jail time were the Workers Party’s former president and treasurer. Thirteen minor figures were acquitted.

Since his conviction Marcos Valério, the businessman who operated the scheme on behalf of Dirceu, has sought to implicate Lula in the case in return for a reduction of his sentence – a move dismissed by Lula as “a bluff”.

The convictions have sent shockwaves through Brazilian politics and turned Judge Barbosa into a national hero. Appointed by Lula to become only the third black judge in the court’s history, this son of a poor construction worker has been feted by the country’s mainstream and social media for his trenchant ruling in favour of conviction.

Anti-corruption campaigners warn though that the convictions in the mensalão case, although important, need to mark the start of a wider judicial campaign to clean up the political system. A trial is yet to be held into a mensalão scheme allegedly operated by the Social Democrats, Brazil’s biggest opposition party.