CHICAGO (CNS) -- The U.S. Court of Appeals for the 7th Circuit in Chicago said July 28 that a Catholic high school in Indianapolis and the Archdiocese of Indianapolis have a constitutional right to hire staff who will uphold their core religious teachings.

The case, Starkey v. Roman Catholic Archdiocese of Indianapolis, involves Lynn Starkey, a former guidance counselor at Roncalli High School in Indianapolis, who sued the school and the archdiocese in 2019, after her contract was not renewed due to her same-sex marriage.

School officials said her marriage was a violation of her contract and church teaching. Starkey argued she had been discriminated against based on her sexual orientation.

She appealed her case to the 7th Circuit after a federal District Court threw out her lawsuit last year.

In dismissing the case, the District Court judge said the school employee's case did not stand up to the principle of ministerial exception that protects a religious school's hiring and firing practices from government intrusion.

The 7th Circuit ruled the lawsuit must be dismissed for the same reason.

"Religious groups have a constitutional right to hire individuals who believe in their faith's ideals and are committed to their religious mission," Luke Goodrich, vice president and senior counsel at Becket, said in a statement.

"Our justice system has consistently ruled that the government cannot intrude on a religious organization's choice of who will pass on the faith to the next generation," he said.

Becket, a religious liberty law firm representing the Indianapolis Archdiocese, argued that both federal law and the First Amendment protect religious schools' right to make hiring decisions based on religious doctrine.

The firm also has noted Roncalli High School asks its employees to "sign agreements to uphold the Catholic Church's beliefs in their personal and professional lives."

In its opinion, the 7th Circuit drew on the Supreme Court's decisions in Our Lady of Guadalupe School v. Morrissey-Berru in 2020 and Hosanna-Tabor Lutheran Evangelical School v. EEOC in 2012. Both are prior Becket cases.

The 2020 ruling said religious schools had the leeway to dismiss teachers for poor performance because they serve as ministers, and the 2012 ruling said ministerial exception frees religious schools from employment discrimination laws.

"Catholic schools are tasked by the church to uphold the dignity of every human person and teach the fullness of the Catholic faith," Goodrich said. "The 7th Circuit's decision ensures that religious schools can remain faithful to their mission."

In her 2019 lawsuit, Starkey, who had worked at Roncalli for almost 40 years, said the school and the archdiocese discriminated against her because of her sexual orientation and subjected her to a hostile work environment.

Starkey, who married in 2015, was asked at the start of the 2017 school year to sign an employment contract with the ministerial language clause included. In 2019, she was told she would not be offered a new contract.

In response to Starkey's initial lawsuit against the school and the Indianapolis Archdiocese, the archdiocese said in a statement: "As head guidance counselor, Ms. Starkey signed a contract acknowledging her role as a leader and committing to promote Catholic teaching, including the traditional Catholic teaching on marriage."

It added that she "knowingly violated that contract" and that her disagreement with church teaching on marriage demonstrated she would "not be able to uphold and model it for her students."

The archdiocese said that many families "have sacrificed so their children can attend schools where they will learn the Catholic faith. They rely on the archdiocese to uphold the fullness of Catholic teaching throughout its schools, and the Constitution fully protects the church's efforts to do so."