In my setting, religion is an incredibly big deal, mostly because the 'God' of my setting (which I call 'The Creator', I'm so freaking imaginative), actually actively did things and brought my humans into existence, but no longer does. The humans all used to live together in a gigantic city, which was ruled by religion - and still is. However, several thousand years ago, there was a religious debacle (Think Catholics vs Protestants, but more intense), and the people who came up with the new idea lost, and were exiled from the city, doomed to die in the forests.
Many of them did die during their exile, but there were enough of them who survived, that they eventually found a safe place to begin anew, and there they built their new city. In an act of spite, their newly elected rulers set up the laws of their new city to actively go against those of their founding city, outlawing religion and praising things that the religion once deemed heretical. Due to how the old religion was, this meant that this new city became rather liberal in their ideas, casting aside (not easily, but eventually) their old prejudices and striving to live in peace with other races.
Now the new city is a shining beacon of modernity, though not without its own flaws and problems (increased crime and corruption).
That's the backdrop - now the question is : Is that idea realistic? Can a city be founded on concepts of spite and hate, and work out in the end? If it isn't, are there any ways that it could?
If any additional info is needed, post in the comments, and I'll update the post accordingly.
EDIT #1: In light of @plagueheart's comment, I'm not proposing that the new city folks be pillars of love and care, simply that they opened their gates willingly to races otherwise reviled by their old city.