Spain's largest-ever corruption trial has ended with a former adviser at Marbella town hall sentenced to 11 years in prison and fined €240m (£203m) for his role in masterminding a network of real estate fraud and bribery.

Former urban planning adviser Juan Antonio Roca was among 53 people convicted in the Costa del Sol resort after a two-year trial that involved former mayors, numerous town councillors and a German aristocrat.

The convictions centred around a cash-for-votes scandal – known as the Malaya case – that saw around €670m paid in bribes from municipal funds over three years in the mid-1990s.

The scheme, which extended across political parties, began when Jesús Gil, the former owner of Atlético de Madrid football club who died in 2006, was mayor of Marbella between 1991 and 2002.

Former mayors Marisol Yagüe and Julián Muñoz were sentenced to six and two years, respectively. Forty-two others were acquitted.

The local "Mr Big", Roca ran Marbella from his private offices for more than a decade, paying town hall officials each time they voted to approve planning permits or contracts to provide municipal services. Planning requirements were widely flouted or completely ignored, resulting in swaths of the once-beautiful seaside resort being covered in high-rise buildings.

The trial was seen as a test case for Spain's attempts to come to terms with the widespread corruption that has seen many parts of the country paved in concrete.

It took the judge, José Godino, more than 40 minutes to read out the sentences, most of which were shorter than the prosecution had demanded. Roca had faced up to 30 years in prison, but was sentenced to less than half that. He has been in jail since 2006.

"This court has arrived at the firm conviction of the reality of the widespread system of corruption that was established in the city of Marbella on the part of the defendants and under the power exercised by Mr Roca," said Godino.

After hearing the sentences, Yagüe described it as a "hard and unjust beating", while former assistant to the mayor Isabel García said: "We have to keep fighting".

As right-hand man to Gil, Roca went from being unemployed to a multimillionaire in just over a decade in the 1990s, with three palaces in Madrid. When he was arrested, police discovered stuffed lions in his home and a Miro painting in the bathroom.

But the man most people blame for the culture of widespread corruption escaped justice when he died at the age of 71. As mayor, Gil lorded it over the town, in effect turning Marbella into a private fiefdom, but at the time of his death he faced numerous cases against him for bribery, and had been banned from public office.