A church in Des Moines has filed a federal lawsuit seeking to strike down as unconstitutional a portion of a 2007 Iowa law and a similar Des Moines city code section that could apply transgender bathroom rules to churches.

The Fort Des Moines Church of Christ filed the lawsuit Monday in federal court in Des Moines against the Iowa Civil Rights Commission and the city. The church asks for an order that keeps the state and the city from enforcing the rules that would allow biological males who identify as women from using women's bathrooms, showers or changing rooms and the same for females identifying as men.

The church says it teaches that "maleness or femaleness is designed by God and is tied to biology, chromosomes, physiology, and anatomy."

The church says the commission has published a brochure that says the state law sometimes applies to churches when they operate a child care facility or when church services are open to the public.

The church said since services are always open, the commission's interpretation of the law could stop the church's minister from preaching sermons addressing God's design for human sexuality. It could also force the church to open its restrooms and showers to persons of the opposite sex violating its deeply held religious beliefs and several constitutional rights including free speech and freedom of religion.

The nonprofit religious legal defense organization Alliance Defending Freedom is representing the church.

"Churches should be free to teach their religious beliefs and operate their houses of worship according to their faith without being threatened by the government," said ADF Legal Counsel Christiana Holcomb in a statement.

The Cornerstone World Outreach Church in Sioux City said Tuesday it has hired the Texas-based First Liberty Institute to help it pursue legal action if the commission doesn't change its intentions by Aug. 5.

"This is a clear case of the state violating the sanctity of the church. It should send chills down the spine of every congregation in Iowa," Chelsey Youman, a lawyer with First Liberty Institute.

Iowa Civil Rights Commission spokeswoman Kristin Johnson did not immediately respond to messages.