DETROIT — A contract engineer is suing his employer, as well as Ford (F), for discrimination after losing an automotive design job because he posted comments criticizing the automaker’s support of the gay community.

Thomas Banks of Ypsilanti, Mich., filed a federal lawsuit against Rapid Global Business Solutions, an engineering and employment service in Troy, and Ford, where he had been on assignment at a Dearborn plant for more than three years.

Banks, who identifies himself as a Christian, claims his civil rights were violated because he was fired Aug. 4, 2014, after speaking up in defense of his religious beliefs. He accused Ford of “endorsing and promoting sodomy.”

The suit seeks an unspecified amount for damages for loss of wages, mental anguish, emotional distress, humiliation, shame and anxiety.

“As we have not yet seen the complaint, we are not in a position to comment on it,” Ford said in a statement. A spokeswoman for Rapid Global also had not seen the lawsuit.

The legal action comes five months after the non-profit Liberty Institute filed a complaint on Banks’ behalf with the Equal Employment Opportunity Commission, saying he was fired after he was accused of violating Ford’s anti-harassment policy. The EEOC decided not to pursue the complaint, notifying Banks and the Liberty Institute of its decision on April 13.

Banks’ lawyer, Timothy Denney of Rickard, Denney, Garno and Associates in Lapeer, referred media calls to the Liberty Institute, which did not return calls on Monday.

The matter dates back to July 2014, when Banks read an article on the Ford intranet that supported efforts to make Ford a more pro-LGBT (lesbian, gay, bisexual, transgender) environment.

Banks used the comment section of the article to say he felt the stance was an “assault on morality” and that Ford should not be endorsing and promoting sodomy, given that homosexuality would ultimately lead to the death of civilization.

“Endorsing and promoting sodomy is of benefit to no one,” Banks said in the comment. “This topic is disruptive to the workplace and is an assault on Christians and morality, as well as antithetical to our design and our survival. Immoral sexual conduct should not be a topic for an automotive manufacturer to endorse or promote.”

Ford officials called Banks to a meeting, and after he confirmed he wrote the comments, he was told he violated Ford’s anti-harassment policy and that his work for the automaker was terminated.

“I was stunned to realize that I was fired over expressing my faith in a single comment,” Banks said in a statement at the time.

Rapid Global subsequently said he violated its policies and also fired him. The lawsuit claims the policies apply only in New York City.