The ancient Israelites got straightforward guidance from Scripture on how to handle people who didn't worship Israel's god, Yahweh. "You shall annihilate them the Hittites and the Amorites, the Canaanites and the Perizzites, the Hivites and the Jebusites just as the Lord your God has commanded."
The point of this exercise, explained the Book of Deuteronomy, was to make sure the "abhorrent" religions of nearby peoples didn't rub off on Israelites.
Yet sometimes the Israelites were happy to live in peace with neighbors who worshipped alien gods. In the Book of Judges, an Israelite military leader proposes a live-and-let-live arrangement with the Ammonites: "Should you not possess what your god Chemosh gives you to possess? And should we not be the ones to possess everything that our god Yahweh has conquered for our benefit?" (See pictures of spiritual healing around the world.)
The Bible isn't the only Scripture with such vacillations between belligerence and tolerance. Muslims, who like Christians and Jews worship the God who revealed himself to Abraham, are counseled in one part of the Koran to "kill the polytheists wherever you find them." But another part prescribes a different stance toward unbelievers, "To you be your religion; to me my religion."
You'd think the Abrahamic God would make up his mind Can he live with other gods or not? What's with the random mood fluctuations?
But the fluctuations aren't really random. If you juxtapose the Abrahamic Scriptures with what scholars have learned about the circumstances surrounding their creation, a pattern appears. Certain kinds of situations inspired tolerance, and other kinds inspired the opposite. You might even say this pattern is a kind of code, a code that is hidden in the Scriptures and that, once revealed, unlocks the secret of God's changing moods.
And maybe this code could unlock more than that. Maybe knowing what circumstances made the authors of Scripture open-minded can help make modern-day believers open-minded. Maybe the hidden code in the Bible and the Koran, the code that links Scriptural content to context, could even help mend the most dangerous of intra-Abrahamic fault lines, the one between Muslims and Jews.
The first step in seeing this code is to look to the world that gave us the Hebrew Bible (what Christians call the Old Testament) and the Koran the world that embedded the code in them. There we'll see how consequential God's mood changes could be how, indeed, a burst of vengeful intolerance helped give us monotheism itself; we'll see that the birth of monotheism left us with what you might call a bad God.
But we'll also see that this God then had bursts of moral growth within both Judaism and Islam and that the proven ingredients of that growth are around today, just when another such burst is needed.
In the beginning or near the beginning was King Solomon. Israel's third King, he reigned in the 10th century B.C.E. (before the common era). In addition to being famously wise, he was flagrantly polytheistic. The Bible handles this awkward fact by blaming it on his many wives of foreign extraction, who "turned away his heart after other gods."
The Bible has the logic backward. In ancient times, when a man of royal blood married a foreign woman of royal blood, it wasn't on a romantic whim. It was part of foreign policy, a way to cement relations with another nation. And that cement was strengthened by paying respect to the nation's gods. Solomon's many wives didn't lead to his many gods; his politics led to both the wives and the gods.
Solomon believed Israel could benefit economically and otherwise by staying on good terms with nearby nations. As game theorists say, he saw relations with other nations as non-zero-sum; the fortunes of Israel and other nations were positively correlated, so outcomes could be win-win or lose-lose. His warmth toward those religions was a way of making the win-win outcome more likely.
Again and again in the Bible, this perception of non-zero-sumness underlies religious tolerance. This doesn't mean religious tolerance is always consciously calculated. The human mind does lots of subterranean work to pave the way for social success. But whether the calculation is conscious or not, people are more open to the religious beliefs of other people if they sense a non-zero-sum dynamic.