When it comes to religion, the country is becoming more diverse by the day. A recent poll showed that people who have no religion now account for nearly a quarter of the population, and another survey indicates that attendance in houses of worship has dropped sharply since 2000.

In light of these changes, courts should not formalize religious (largely Christian) privilege in government – yet that’s exactly what a federal appeals court did on Friday.

The U.S. Court of Appeals for the District of Columbia Circuit upheld rules promulgated by the U.S. House of Representatives that effectively bar Dan Barker, a former Christian minister turned atheist, from delivering an invocation.

Barker, co-president of the Freedom From Religion Foundation, wanted to give a secular invocation before the House. Although the House has a chaplain paid by taxpayer funds, it often allows guest religious leaders (usually Christians although non-Christians are invited on occasion) to deliver opening prayers. Barker argued that House members could benefit from hearing a secular invocation as well and was invited to deliver one by U.S. Rep. Mark Pocan (D-Wisc.).

But the House chaplain, the Rev. Patrick J. Conroy, was determined to stop Barker. Conroy made a number of arguments for why Barker should be excluded, at first asserting that Barker is not a properly ordained religious figure. Conroy’s legal counsel later argued that the House’s rules require that guest chaplains deliver “a religious invocation,” and since Barker was not willing to do that, he could be denied.

The appeals court apparently accepted this reasoning, writing in its ruling in Barker v. Conroy, “The House’s requirement that prayers must be religious nonetheless precludes Barker from doing the very thing he asks us to order Conroy to allow him to do: deliver a secular prayer.”

Allowing the House to prohibit secular invocations excludes millions of Americans who identify as non-theist, agnostic, spiritual but not religious or “nones,” relegating them to the status of second-class citizenship. Ironically, this is the segment of the population that is growing most rapidly.

The court’s reasoning appeared to be heavily influenced by separation-of-powers concerns and other legal principles that are applicable solely to the courts’ relationship with Congress. To respect the right of non-believers, this ill-advised decision should be limited to that context.