A federal court ruled University of Iowa officials must pay out of their own pockets for discriminating against a prominent Christian student group, calling the university's conduct "ludicrous" and "incredibly baffling" during a hearing last week.

Judge Stephanie M. Rose of the U.S. District Court for the Southern District of Iowa ruled Friday that the University of Iowa and its officers violated constitutional law when they kicked InterVarsity Christian Fellowship, and other religious groups, off the campus in June 2018 for requiring leaders to uphold Christian beliefs -- but giving a pass to secular student groups that also have leadership requirements.

FEDERAL JUDGE RULES IN FAVOR OF CATHOLIC ADOPTION AGENCY IN RELIGIOUS LIBERTY CASE AGAINST MICHIGAN

The university limited the Christian group's access to campus after being there for over 25 years, froze its bank account, shut down its website and advertised that it was "defunct" for lack of student interest, according to court documents. This violated the Christian group's free speech and free exercise rights, the court ruled.

InterVarsity Christian Fellowship students.

InterVarsity Christian Fellowship students. (Becket)

“It’s rare for a federal judge to call out a public university for ‘ludicrous’ and ‘incredibly baffling’ violations of the First Amendment," Daniel Blomberg, senior counsel at Becket, who represented InterVarsity and BLinC, told Fox News. "But it was necessary here. The court already told the University of Iowa to stop picking on one Christian student group. The University responded by doubling down and kicking out Christian, Muslim and Sikh groups. That was obviously wrong. And it’s even more clearly wrong once you consider, as the court did, that it was also unfair."

He explains the university makes room for Greek groups and sports clubs, for the College Democrats and Republicans, for the environmental groups and the pro-life groups, but singled out religious groups.

“We must have leaders who share our faith,” Greg Jao, director of external relations at InterVarsity Christian Fellowship/USA, said in a statement. “No group -- religious or secular -- could survive with leaders who reject its values. We’re grateful the court has stopped the University’s religious discrimination, and we look forward to continuing our ministry on campus for years to come.”

MORE ON FAITH

This was the second lawsuit brought against the university after Business Leaders in Christ (BLinC) won their case earlier this year. A BLinC member claimed he was denied a leadership position for being openly gay. The group argued the member was rejected because "he expressly stated that he rejected BLinC's religious beliefs and would not follow them."

The court stated it “would never have expected the university to respond to that order by homing in on religious groups” like InterVarsity, while “carving out explicit exemptions for other groups. But here we are.” The court did “not know how a reasonable person could have concluded this was acceptable,” since it “plainly” doubled down on the exact same conduct the court had already held unlawful.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

“It’s too bad it took twice for the University to learn its lesson,” Blomberg added. “There was no excuse the first time for squashing students’ First Amendment rights. University officials nationwide should now take note that religious discrimination will hit them in the pocketbook.”

The university did not immediately respond to a Fox News request for comment.