A computer glitch at the town hall extension in Hammersmith led to the lights being left on at night for five years at a cost to taxpayers of £250,000.

Up to £50,000 a year has been spent fuelling 24-hour illumination throughout the seven-storey office block, despite only a handful of noise nuisance and environmental protection staff having to work through the night.

Hammersmith and Fulham Council considered installing switches on each of the floors when the computerised building controls failed in 2005, making it impossible to turn off the lights.

But officers rejected the idea on the cost grounds and allowed the bulbs to continue burning, producing up to 1,250 tons of carbon dioxide in the years since.

Action was finally taken at the end of last month to reduce the number of lights which are left on at night, and the council is now looking at whether to install more energy efficient LEDs.

But concerns about the issue were raised two years ago by the council's opposition leader, Stephen Cowan, who says more should have been done to cut the waste in the ageing 1970s building.

He said: "Consider for a moment all the horrible cuts in services or the vast amount of stealth taxes local residents have had to suffer in recent years. Meanwhile, they were literally burning our money night after night. This tells you a lot about what is wrong with Hammersmith and Fulham Council, and provides an insight to the ineffective culture around their cuts programme."

Mr Cowan lambasted a 'self-congratulatory' message on the council's intranet which announced the authority would now save money and energy by turning off most of the lights in the town hall extension after office hours, except for those on the sixth floor and in stairwells.

The council's environment leader, Nick Botterill, said: "Council staff have been working in all areas of the building for 24 hours a day until recently, which is why the lights were on.

"However, as the council has got slimmer we have been able to move all of our overnight employees onto a single floor enabling us to turn off the lights on unoccupied floors and generate an estimated saving of around £40-50,000 per year.

"It has taken us longer than we would have liked to achieve this saving because of the design of the building and problems with the out-dated computer-controlled lighting system."

He added that plans to pull down the town hall extension and move staff into new offices created through the King Street regeneration project would cut energy bills by another £150,000 a year.