The former treasurer of Spain’s ruling Popular Party (PP) has been sentenced to 33 years in prison for amassing an offshore fortune as a fixer arranging contracts between public authorities and private companies.

Luis Bárcenas funnelled €48 million in Swiss bank accounts through a “system of defrauding public coffers” by approaching companies potentially in line for public contracts and agreeing to inflate costs while sharing the extra profits.

Bárcenas, who was a senator for the PP between 2004 and 2010, was also ordered to pay €44 million for evading €11.5 million in tax.

Almost a decade after the investigation into the PP’s finances began in 2009, the High Court concluded that the PP ran a slush fund and the party “received its corresponding portion” from Bárcenas's dealings, judges said.

The PP itself was also found guilty of benefiting from the criminal network, albeit without realising it. The party headed by Prime Minister Mariano Rajoy has been ordered to pay back €245,000 used in electoral campaigns in two towns outside Madrid.

Mr Rajoy gave evidence at the trial last summer, claiming that his party had never received cash donations from companies, while also explaining that he had never played a role in the PP’s financial activities.

Rafael Hernando, the PP's chief parliamentary spokesman, said on Wednesday that his party “did not know about or agree to these actions”, adding that it would be appealing against the sentence.