Atlanta’s City Council just approved a $1.2 million settlement with its former fire chief, Kelvin Cochran, who was fired in 2015.

The council voted 11-3 in favor of the settlement on Monday in order to avoid the possibility of paying millions more in legal fees and damages if they lose the case.

In 2015, Cochran passed out copies of Who Told You That You Were Naked? – his self-published book – at work. One of his subordinates reported him because the book contained passages that compared homosexuality to pederasty and bestiality and said that gay people are “wicked, ungodly sinners” who are “unclean.”

The city suspended him, and while he was suspended he mounted a campaign saying that he was being punished for his religious beliefs. This violated the terms of his suspension and he was fired.

He sued the city and lost his case last year, when the judge found that the city had not discriminated against him because he’s a Christian and had ample reason to fire him.

But the judge’s ruling left open the possibility for further litigation when it comes to the city’s pre-clearance policy, which was mentioned in Cochran’s termination letter. The policy requires that city employees get clearance for outside-of-work speech like publishing books, which the judge said may be unconstitutional.

It was this possible litigation that the Atlanta City Council decided to avoid with the settlement.

Alliance Defending Freedom, the hate group that represented Cochran, celebrated the settlement.

“We are very pleased that the city is compensating Chief Cochran as it should, and we hope this will serve as a deterrent to any government that would trample upon the constitutionally protected freedoms of its public servants,” said one of their lawyers.

The settlement now goes to Mayor Keisha Lance Bottoms for her signature.