From the first Judge in Loving:
"Almighty God created the races white, black, yellow, malay and red, and he placed them on separate continents. And but for the interference with his arrangement there would be no cause for such marriages. The fact that he separated the races shows that he did not intend for the races to mix."
Sounds pretty religious to me.
During Newman v Piggie Park, the restaurant owner claimed it was his strongly held religious belief that the races should not mix in any way. The SCOTUS rejected this defense.