Romania's Constitutional Court has ruled that mayors who are handed suspended prison sentences for corruption must resign.

President Klaus Iohannis called on the court to overrule legislation passed by Parliament in December that allowed mayors to keep their posts even after they had received a suspended sentence.

The court agreed with Iohannis, and interim court president Valer Dorneanu said Wednesday that Parliament had "frustrated the purpose of lawmakers to defend the integrity and responsibility" of locally elected officials.

Corruption is widespread in local administration. According to the anti-corruption prosecutors' office, more than 100 mayors, deputy mayors, and county council officials were indicted for corruption in 2015.

In June local elections, the mayor of the northwestern city of Baia Mare, currently in jail for corruption, was re-elected.