A lay minister won a unique legal battle after being fired from a job in public service for his religious views.

Dr. Eric Walsh, a lay minister of the Seventh-day Adventist faith, recently won a lawsuit against the state of Georgia after he was fired for his personal sermons.

In May 2014, Walsh was hired by the Georgia Department of Public Health as a district health director and was soon asked by state officials to turn over content from his sermons, according to Fox News. After complying, Walsh was fired within two days.

His attorneys said the government was curious about sermons Walsh delivered on health, marriage, sexuality, world religions, science and creationism. He also preached about what he believes the Bible says regarding homosexuality, according to Fox News.

“He was fired for something he said in a sermon,” said Jeremy Dys, Walsh’s attorney, according to Fox News. “If the government is allowed to fire someone over what he said in his sermons, they can come after any of us for our beliefs on anything.”

Immediately after being fired, Walsh retained legal counsel through the First Liberty Institute, the largest legal organization in the nation dedicated exclusively to protecting religious freedom for all Americans, according to First Liberty‘s website.

Walsh’s lawsuit cited discrimination based on his religion and other civil rights violations.

On Feb. 7, First Liberty reached a final settlement agreement with the state of Georgia on behalf of Walsh, with the State of Georgia paying $225,000 to settle the lawsuit, reported First Liberty.