ANYONE who happened to be in Colombia’s capital a year ago saw three days of chaos. Mounds of rubbish piled up on street corners as a municipal agency struggled to implement a new waste-management system after Gustavo Petro, Bogotá’s left-wing mayor, allowed the contracts of private firms that had been providing the service to lapse. Faced with a public outcry, Mr Petro called the private firms back.

Since then, rubbish has been collected regularly. But those three days have cost Mr Petro his job and his political future. On December 9th Colombia’s inspector-general deposed the mayor and banned him from public office for 15 years for violating the principles of the free market and putting public health at risk.

The inspector-general is a post unique to Colombia, charged with scrutinising public officials, including elected ones, and penalising them if they break the law. That in itself is odd: in most countries, such tasks are left to prosecutors, courts and voters. To make matters worse, the incumbent inspector, Alejandro Ordóñez, appears to have abused his post for political ends. Mr Ordóñez, an ally of Álvaro Uribe, Colombia’s former president, is a conservative and an ultra-traditionalist Catholic.

By common consent, Mr Petro, a former guerrilla with an arrogant personality and an authoritarian streak, has not been a good mayor. But even his critics were shocked by his ousting. The penalty seems wildly disproportionate to his mistakes. The previous mayor, Samuel Moreno, who faces criminal charges for allegedly having taken kickbacks for construction contracts, received only a 12-month suspension from Mr Ordóñez. Two congressmen convicted of ties with right-wing paramilitary groups by the Supreme Court were cleared of administrative wrongdoing by Mr Ordóñez in May. He has also threatened disciplinary action against judges and notaries who register gay marriages.

Mr Petro claimed that his ouster was a coup against his “progressive” administration. He banned bullfighting, tried to curb property developers and defended gay rights. In response to the ruling, he harangued tens of thousands of supporters and municipal workers from a balcony in the Plaza Bolívar on consecutive nights. In exaggerated terms, he likened his fate to that of the murder of hundreds of leftist political activists in the 1980s as a manifestation of the “fascism” of Colombia’s ruling elite.

His fate also reverberated in Havana, where the FARC guerrillas are negotiating a peace agreement with the government. Last month they reached a partial accord on how the FARC might participate in democratic politics. Calling the ruling against Mr Petro a “serious blow” to the peace process, the FARC declared: “with a simple signature, Ordóñez gave us rebels a lesson in what democracy means to the oligarchy in Colombia.”

That will not trouble Mr Ordóñez, who opposes the talks. Both he and Mr Petro are moral crusaders, pushing opposing agendas. Both had been preparing for a possible presidential run in 2018. Unless his appeals prosper, Mr Petro is out of that (although one poll in Bogotá showed support for him up from 30% to 50% after the ruling). As for Mr Ordóñez, he looks to have overreached. There were calls this week for his office to be abolished, or at least for his powers to be curbed. That would be a blow against arbitrary power.