 -- A rejected request from Satanists to give an invocation at a city council meeting has prompted a religious discrimination lawsuit in Arizona.

In a case that blurs the line between church and state, the Satanic Temple filed a federal suit against the city of Scottsdale, Arizona, alleging its First Amendment rights were violated when the city council refused to allow one of its members to give the invocation at the 2016 meeting.

The lawsuit, filed Monday in U.S. District Court in Phoenix, contains emails allegedly obtained by the Satanists through the state's open records law in which city council members said the temple's request to give an invocation was "absurd" and that allowing it would be "taking equality too far."

"It's disheartening when public officials can display such a flagrant disregard for the most foundational bedrock principles of constitutional law while acting upon their personal biases at the expense of their taxpayer base, who are ultimately left to pay the legal costs for the ignorance of their mayor and city council," said Lucien Greaves, a spokesman for the Satanic Temple.

City officials denied that the temple's request was rejected on religious grounds.

"The temple was turned away in 2016, not because of any particular religious affiliation, but because they did not have any substantial connection to the Scottsdale community," the city said in a statement to ABC News. "The city has not been served with a complaint, so we are not in a position to offer specific comments in response. We believe the city's practice meets all constitutional requirements."

Stuart de Haan, a lawyer for the Satanic Temple, said the city's excuse is "just not true." He said that although the group has no physical temple in Scottsdale or anywhere in Arizona to congregate, it has members throughout the state, including in Scottsdale.

De Haan said the member who was to give the invocation was Michelle Shortt, a resident of Arizona since 1998 and the head of the temple's Arizona chapter.

The Satanists are asking for undisclosed damages and the cost of attorney fees. No court date on the case has been set.

Temple members first made their request to give the invocation on Feb. 8, 2016, according to the lawsuit. A city management assistant initially scheduled Shortt to give the invocation on April 5, 2016. But Shortt's appearance at the city council meeting was rescheduled and eventually denied on May 23, 2016.

The city filled the invocation slot initially given to Shortt with a student pastor from the First Southern Baptist Church of Scottsdale, according to the lawsuit.

Before the city canceled Shortt's appearance, council members were bombarded with emails from constituents angry that they would even consider allowing someone from the Satanic Temple to give the invocation.

"Immediately after this so-called 'prayer' over you and the city you represent, an exorcism should be held on your behalf by your own priest, minister, or rabbi," Scottsdale resident Angel Ramon Alvarado Jr. wrote in an email to Mayor Jim Lane, according to the lawsuit.

In a reply email to one constituent asking him to stand up to the Satanists, city councilman David Smith, according to the lawsuit, wrote, "Please be assured I share your sentiments. I am informed permission was given, relying on a Supreme Court opinion that this 'religion' is protected by the First Amendment ... an absurd notion, even if not surprising."

The emails contained in the suit show some council members struggled over the issue.

"This is very concerning to many of us," city councilwoman Linda Milhaven wrote in a reply to a constituent. "To deny anyone the right to give the invocation requires that we eliminate all prayer at our meetings. I'm not willing to give up my right to pray publicly in order to deny someone else their right. I am a Christian and my faith is strong enough to survive a three-minute invocation that may contradict my faith."