In 2007, Dr Martin Gaskell applied for the position of director at the new MacAdam student observatory at the University of Kentucky. He stood "breathtakingly above the other applicants in background and experience" according to the chairman of the selection panel, but he did not get the job. Unsurprisingly, he sued.

It is not controversial to state that English-born Gaskell is a devout Christian. He has also said that he is sceptical about certain aspects of evolutionary theory and that he respects creationists for being true to the Bible. However, his own views have more nuance and he probably belongs somewhere in the broad church usually labelled "theistic evolution". But the mere fact he was sympathetic towards creationists and kept an open mind about evolution appears to have disqualified him from being director of the observatory. As the chairman of the selection committee emailed afterwards, "no objective observer could possibly believe that we excluded Martin on any basis other than religion ... "

The case was about to go to trial. But, last month, the university caved in and settled out of court. Gaskell was given a payoff of $125,000, although the university refused to admit any wrong-doing. Nonetheless, this appears to be an unambiguous example of religious discrimination within the American academy. It is hard to imagine the university would have settled if they were sure of their ground.

The case has given rise to a certain amount of hand-wringing in anti-creationist circles. Clearly, Gaskell's doubts about evolution have not curtailed his ability as an astronomer. His achievements in the field tell us that much. He is a respected expert on supermassive black holes and a long-serving research fellow at the University of Texas. But his religious faith has been enough for some to doubt his ability as a scientist. Professor Lawrence Krauss, physicist and neo-atheist sympathiser, writes in the New Scientist that doubting evolution should have disqualified Gaskell because it showed he had a "lack of understanding of the nature of scientific theory". Richard Dawkins called the university's decision to capitulate "a farce".

There are some mitigating factors. Kentucky hosts a creationist museum that shows dinosaurs in the Garden of Eden, so we should have a smidgeon of sympathy for the local university. When viewed from the Appalachian mountains, the conflict between evolution and creationism looks like an existential struggle for the soul of science. It appears the selection committee consulted with their colleagues in the biology department about Gaskell's views and the feedback they received put them in a very difficult position.

None of this can justify religious discrimination. Liberals stand for a pluralistic society where people can both hold and express a wide variety of beliefs, some of which others might find absurd or distasteful. That means the proper forum for disagreements is open debate, not private emails between members of an academic selection committee. To assert that it was acceptable to exhibit prejudice against Gaskell is to concede that similar treatment can be meted out to others. Should a hospital be allowed to reject a brain surgeon because he supports abortion? Should a Christian school refuse to employ an atheist? For this reason, those who oppose discrimination must oppose all discrimination.

But the University of Kentucky's actions were worse than a crime against liberalism. In the narrower context of the struggle with creationists, they were a mistake. The 2008 documentary Expelled: No Intelligence Allowed declared that proponents of "intelligent design" were subject to systematic persecution by universities as a result of their views. The cases actually cited in the film were weak and there was nothing that could be described as actionable. However, during the same year, Michael Reiss was forced out of an educational role at the Royal Society when he suggested that teachers should treat creationism as a world view rather than a misconception. Reiss is a clergyman as well as a scientist and it was hard to escape the conclusion that many atheists saw this as a problem.

So the last thing the scientific community should have done was to engage in patent discrimination against a Christian. Although the Gaskell case relates to events in 2007, the university has had more than three years to find an amicable (and cheaper) solution. Creationists could scarcely have asked for a better propaganda coup, and a brief scan of their blogs show that they are milking it for all it is worth.

Gaskell, on the other hand, is not keen to become a creationist poster boy. Interviewed after the case was settled, he said he wanted to counter the perceived incompatibility between religion and science, describing it as an "illusion". It is unfortunate that in neo-atheist circles even such moves towards accommodation are far from welcome.