ALAMEDA (KCBS) — A Superior Court judge has ruled on Friday that Alameda’s former fire chief, Dave Kapler, must pay $260,000 the city spent fighting his alleged wrongful termination suit that city officials said is now over.

It all began when Kapler was photographed fueling his BMW at a city gas pump in 2010. After working out a deal with the city for a payout out of $75,000 and health benefits, he resigned. Later that year, he filed a wrongful termination lawsuit forcing the city to pay for legal fees that Kapler must now reimburse.

READ MORE: 'Your Life Does Not End Because You Have A Diagnosis': Shantel Smith Opens Up About Her Battle With Multiple Sclerosis Before 'Survivor'

“We’re elated, as you know, this stemmed from our former fire chief essentially stealing gas to use in his personal vehicle and he was about to be terminated for that,” Alameda Mayor Marie Gilmore said.

“He did something wrong and we’re the ones that get sued? That’s not the way it should be.”

READ MORE: Port Of Oakland Cargo Volume Down 20% In October As Ships Diverted

Gilmore said that the judgment from Alameda Superior Court effectively ends the lawsuit but that now they must begin the arduous process of collecting the money.

“That’s always the challenge when you win a judgment from the court and then you actually have to go collect it from the individual,” she said. “I think there’s a bunch of different ways that can be done,” she said.

When the incriminating photo was leaked, Kapler denied wronging claiming that accusations against were directed by disgruntled rank-and-file firefighters that fought against his leadership.

He also claimed that his contract allowed him to fuel his personal vehicle when conducting personal business.

MORE NEWS: CHP: Woman Killed, 4 Hospitalized In Weekend Union City DUI Crash; Driver Arrested

(Copyright 2013 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)