It was the latest move in a dispute that has been dragging on for a year and a half over the drinks maker’s decision to convert a bottling plant near the city into a logistics centre.
The move is aimed “at defending implementation of a Supreme Court ruling,” the city councillor behind the decision, Pablo Carmona, was quoted at saying by El Pais newspaper.
The Coca-Cola Company said the council had refused to give a film production company the authorisation to shoot the ad in the public gym.
The US drinks giant slammed what it called the council’s “unilateral decision.”
In a statement, it said it “regrets the situation and leaves the door open to continue collaborating with the authorities.”
The council took power in June, run by a group that emerged from the “Indignado” anti-austerity protest movement.
Coca-Cola had planned to dismiss 1200 workers from the plant but a Spanish court last year ordered it to cancel the layoffs and reinstate more than 200 who had already been dismissed.
Eighty-five returned to work on Monday at a new logistics centre on the site of the old bottling plant in the Fuenlabrada district of southern Madrid.
In the case of another 130 workers, a court is due to rule on Thursday whether they should be appointed to new posts in the logistics centre.
In a potentially significant labour case, the court could instead order the company to give them back their old bottling jobs despite the firm’s plans to wind down those operations.