People are more racist and homophobic when their surroundings are chaotic, according to new research from the Netherlands.

Scientists tested 40 people at Utrecht railway station during a cleaners’ strike that had left the station dirty and litter-strewn.

They returned to repeat the experiment after the strike ended and the station was clean.

Dr Diederik Stapel and Dr Siegwart Lindenberg, social scientists at Tilburg University in the Netherlands, asked participants to comment on social groups, including Muslims, gay people and Dutch people.

People who took part while the station was dirty were more likely to agree with both positive and negative stereotypes.

The small-scale experiment also examined subconscious responses to race. All subjects were white, but when they were asked to take a seat in a row of chairs, one chair at the end was occupied by a black or white Dutch person.

In the messy station, people on average sat further from the black person than the white person, whereas in the clean station there was no statistical difference.

Dr Stapel and Dr Lindenberg say stereotyping may be “a way to cope with chaos, a mental cleaning device”.

“The message is clear,” Dr Stapel said. “Signs of disorder will not only increase anti-social behaviour but lead to stereotyping and discrimination.”

The researchers say implications of the work for use in public policy are not yet clear.

“One question we’d need to answer is how long these kinds of effects last,” Dr Stapel said. “There is a possibility that people may quickly adapt to disorder, so I would be very wary of concluding that people who live in unclean and disordered areas are more prejudiced because of that.”

He added: “People who constantly live in disorder get used to it and will not show the effects we find. Disorder in our definition is something that is unexpected.”

The study, ‘Coping with Chaos: How Disordered Contexts Promote Stereotyping and Discrimination’, was published in the journal Science.