I've always been taught at my Christian class that the bible is a work of history, and we study the events of the old testament as if it was one.
But every time we find an irregularity or a contradiction within the bible, we are told to draw only the biblical truths and not pay attention whether what is written is accurate or not.
I'm not talking about the creation of the world ****. I'm talking about stuff like why God was prejudiced between the city of Jerusalem (which he continually saves) and the city of Babylon or Philistia (both of which he continually uses as mere puppets).
There are many times though that I see people passing it off as history.
Well I'm just wondering if there is an official answer. Is the bible history or fiction?