CHICAGO — A music director fired from his job at a Catholic church after he got engaged to his male partner filed a federal discrimination complaint Thursday.

Colin Collette worked at Holy Family Catholic Community in Inverness, Ill., for 17 years before being terminated from the job in late July after he announced his engagement on Facebook. At the time, the Rev. Terence Keehan told him that his same-sex relationship violated the tenets of the Roman Catholic Church, he said.

Collette, of Chicago, filed the complaint alleging discrimination on the basis of sex, sexual orientation and marital status against Keehan and the parish’s manager.

“It is with deep regret that I have had to pursue this course of action,” Collette said at a news conference Thursday. “I have chosen to enter into a marriage, as is my right under Illinois law, and perhaps I can open the door to other men and women who the church has chosen to exclude from the community.”

Susan Burritt, a spokeswoman for the Archdiocese of Chicago, said in a written statement: “The Archdiocese of Chicago has not seen the complaints that Mr. Collette has filed with the civil authorities and so we are unable to comment on them. We will respond to the complaints in the forums in which they are filed at the appropriate time.”

Collette’s claims were filed with the federal Equal Employment Opportunity Commission and the Cook County Commission on Human Rights, the local body that handles discrimination allegations. A federal discrimination complaint generally has to be filed and reviewed before a person can sue a former employer over alleged discrimination. The EEOC can issue an aggrieved employee a notice of the right to sue the employer or, in rare cases, the agency can sue the employer on the employee’s behalf.

The success or failure of Collette’s claim likely will turn on what’s called the “ministerial exception” to anti-discrimination law, legal experts said. In 2012, the U.S. Supreme Court issued a ruling that religious institutions have broad latitude in hiring and firing people whose jobs include religious roles.

The ruling left room for interpretation on the issue of which employees are considered ministerial, experts said. The exception extends beyond clergy; the woman who was the subject of the 2012 ruling was a teacher at a Lutheran school.