Dr. Eric Walsh, who in recorded sermons called homosexuality is a sin and said evolution is a "religion created by Satan," filed a federal lawsuit Wednesday against the Georgia Department of Public Health for rescinding a job offer two years ago because of what he said were his religious views.

Walsh in the suit alleges that state officials engaged in religious discrimination and retaliation against him over the content of his sermons, which he created as a Seventh Day Adventist preacher. He has said the state health department offered him a job in 2014 as the district health director for Northwest Georgia, sending him a welcoming letter before taking the offer back with little explanation.

In a statement released by the First Liberty Institute, which is representing Walsh in the suit along with Atlanta law firm Parks, Chesin & Walbert, Walsh said he has been unable to get a job in public health since then.

“I couldn’t believe they fired me because of things I talked about in my sermons,” Walsh said. “It was devastating.”

The department, however, said Walsh’s religious views had nothing to do with their decision to withdraw the offer, which was made while Walsh was public health director in Pasadena, Calif.

“Georgia Department of Public Health policy requires the disclosure and written approval of secondary employment held by its employees,” the department said in a statement released Wednesday in response to the suit.

“Dr. Walsh was extended a conditional offer of employment by DPH, subject to passing a routine background check,” the statement said. “During the background check process, DPH learned Walsh failed to disclose outside employment to his previous public health employer, which also was in violation of California law.

“Due to violation of both California state law and DPH policy, the offer to Dr. Walsh was rescinded. During his interview, Dr. Walsh disclosed his religious beliefs to DPH staff and indicated that he preached at his church in California. Dr. Walsh’s religious beliefs had nothing to do with the decision to withdraw the offer.”