The city of Atlanta said Monday it will pay $1.2 million to a former fire chief following a federal court ruling in December that found some city policies that led to his firing are unconstitutional violations of First Amendment freedoms.

Kelvin Cochran, a former fire chief who was fired in 2015, said he was dismissed from his job because of his Christian faith. Cochran had written a religious book that included his beliefs about sexual morality.

“The government can’t force its employees to get its permission before they engage in free speech. It also can’t fire them for exercising that First Amendment freedom, causing them to lose both their freedom and their livelihoods,” Kevin Theriot, senior counsel for Alliance Defending Freedom, who argued before the court on behalf of Cochran last year, said in a statement.

“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,” Theriot added.

The book that Cochran wrote for men, titled “Who Told You That You Were Naked?” and published in 2013, discussed marriage and homosexuality from a biblical perspective, as The Daily Signal previously reported.

“No one should have to choose between keeping his job and speaking about his faith on his own time, but that’s the situation I faced as fire chief of the City of Atlanta,” Cochran said in a statement provided to The Daily Signal, adding:

All my life, I dreamed of being a firefighter, and I had to overcome many instances of discrimination because of the color of my skin.

Those challenges and my faith taught me the value of creating an inclusive, diverse, and tolerant environment in the workplace. Regardless of any characteristic or belief of my fellow firefighters, I was honored to serve alongside them.

Every day of my 34-year career, I would have gladly laid down my life to protect anyone in Atlanta or in Shreveport [in Louisiana], where I served before that—no matter who they were or what they believed.

But in serving the public as a firefighter, I did not forfeit my constitutional right to speak freely on my own time.

If we want to have freedom for ourselves, we have to extend it to others—even people with whom we disagree about important issues like marriage.

Cochran’s book reportedly had one page on which Cochran, 58, discusses homosexuality and asserts it is against the Christian lifestyle.

According to the Alliance Defending Freedom, a nonprofit Christian public interest law firm, the U.S. District Court for the Northern District of Georgia found that the city’s rules regulating non-work-related speech, such as Cochran’s book, “were too broad, and allowed city officials to unconstitutionally discriminate against views with which they disagree.”

Ryan T. Anderson, senior research fellow at The Heritage Foundation and author of “Truth Overruled: The Future of Marriage and Religious Freedom,” said that Atlanta’s decision strengthens the freedom of speech.

“This is a big win for the First Amendment rights of all Americans,” Anderson said. “No one, not even public servants, gives up their rights to freedom of speech or free exercise of religion—not even if they hold beliefs that elites scorn.”