Bogota’s leftist mayor has been formally removed from his post and barred from holding office for 15 years for trying to have a public garbage collection.

Colombia’s inspector-general charged that Gustavo Petro violated constitutional principles by ending garbage collecting concessions to private firms.

Petro, a former leftist guerrilla who was elected to a four-year term ending in 2016, called the action a “coup d’etat against progressive government in the city of Bogota”.

He exhorted his supporters to refrain from violence but said “undoubtedly we should express ourselves”.

“I continue to be the mayor of Bogota until there is a firm (legal) decision to the contrary,” Petro insisted.

The dispute centers on Petro’s decision a year ago to put city garbage collecting under a public agency, ending contracts for privately-owned companies.

A rocky transition left garbage piled up on city streets during a three-day lapse in service.

Inspector-General Alejandro Ordonez found the action hurt public welfare and violated constitutional principles of free enterprise and competition.

In Colombia, the inspector-general is empowered to investigate, punish and intervene to assure the legal functioning of public institutions.

Petro, 53, quipped that he would not be able to hold office again until he was 68 years old.

“It’s a life sentence,” Petro said. “Here a message is being sent to the nation, to all mayors, that attempts to take back public power is a crime, a felony or an irregularity.”

Addressing thousands of supporters from the balcony of the mayor’s office overlooking the central Plaza Bolivar, Petro called for peaceful protests against the decision.

The ruling is a setback for the political left in Colombia just as progress is being made in peace talks with the FARC to end five decades of war in the Andean nation, and it came five months before presidential elections.

Petro’s election as mayor in 2011 was seen as proof that politics was the way forward for rebel movements. The FARC, or Revolutionary Armed Forces of Colombia, reached agreement with the government last month on how they would be incorporated into the political system.

“Here we begin a democratic and peaceful revolution,” Petro said, urging the FARC leadership to continue its year-long negotiation to end the war and accusing the right-wing inspector-general, Ordonez, of being against the peace process.

“Be aware, these are historic days, this is not just another protest.”

While Petro’s popularity has slumped over the past year, many see Ordonez’s ruling as damaging to the country’s institutions.

“This is terrible for democracy, it’s political manipulation,” said Arcangel Lopez, as he squeezed orange juice at a cart on a Bogota street corner. “Each time a politician does something for the people, they throw him out of office.”

Justice Minister Alfonso Gomez Mendez questioned whether the constitution should allow an official to remove another elected by popular vote.

President Juan Manuel Santos said that he respected Ordonez’s ruling as well as Petro’s right to appeal.

It was not clear how long an appeal would take or when new elections for mayor could take place.

Petro, an economist and former congressman, ran a city with an annual budget of about $7bn.

Jailed for his rebel activities in the 1980s after joining M-19 as a university student, Petro was among the most vocal legislators in denouncing corruption and congressional ties to right-wing paramilitaries.

The M-19 rebel group was suspected of being paid by late drug lord Pablo Escobar to attack the Supreme Court in 1985 and destroy evidence that may have led to his extradition.

As many as 95 people were killed in that attack, including 11 justices.

While the M-19 disarmed at the end of the 1980s, the drug-funded FARC remain active throughout the country in a war that has killed more than 200,000 since it began in 1964.