In earlier posts, I have described how heroes, kings, and other legendary characters from Canaanite lore were incorporated in the OT either through direct allusion or exaptation as literary characters in new distinctively Israelite stories. The legend of Danel, the father of Aqhat, is directly mentioned in Ezekiel 14:12-20, 28:1-3 and was likely reused as source material in the cycles of legends about the righteous judge Job, the young warrior David, and the prophet Elisha (cf. , , and ). The legends surrounding the Rephaim kings revered in Bashan and who the Canaanite leaders regarded as their ancestors contributed to the biblical stories about the mighty Nephilim and Rephaim warriors and the giant Og, king of Bashan (cf. ).
Another well-known example is the story of the non-Israelite divine seer named Balaam, son of Beor. According to Numbers 22-24, Balaam was a devout worshipper of El/Yahweh whom the Moabite king Balak tried to bribe into cursing the children of Israel. Balaam asked God what he should do and Balaam refused Balak's offer on his divine counsel. Not satisfied, Balak tried again and "sent chiefs, more numerous and more renowned than the first" who begged Balaam to please go with them and curse the Israelite people (22:15-17). In reply, Balaam specifically rejected material gain: "Even if Balak gave me his house full of silver and gold, I could not go against this order of Yahweh my God in anything" (22:18). Then God came to Balaam in the middle of the night and said to him, "Have not these men come to summon you? Get up and go with them, but you must do nothing except what I tell you" (22:20). And so Balaam OBEYS Yahweh and saddled his donkey and went out with the Moabite chiefs. Then, almost inexplicably, Yahweh changed his mind and sent an angel to block the path and open the mouth of the donkey to speak to Balaam (v. 22-35). Balaam berates and curses his donkey who (unbeknownst to him) was being obediant to God, and when the angel reveals himself Balaam realizes that he had sinned against God. Subsequently, Balaam delivers his blessings to Israel and the sons of Jacob (ch. 23-24). The picture of Balaam in Numbers is thus that of a righteous but imperfect man who desired to follow God. It should be noted however that the account in Numbers is actually a composite built of several different literary traditions. Source critics usually distinguish two distinct documents in ch. 22: Elohist (E) material in 22:2-21, 36-41, Yahwist (J) material in 22:22-35a, and a harmonizing gloss by the JE redactor in 22:35b. Thus in E, 'lhym dominates as the term for God and there are literary resemblances with other passages in E (cf. 22:9a, 20a = Genesis 20:3, 31:24), whereas yhwh is exclusively used in the J passage. There is also a literary seam at 22:22 which is evident in the very poor fit between the Yahwist episode with the talking donkey and the angel (22:22-35a) and the preceding context. The text in 22:22 says that "his going kindled the wrath of Yahweh" which inexplicably follows God's command to Balaam two verses earlier to go with the Moabites (v. 20). Moreover in v. 21 Balaam goes "with the princes of Moab" whereas in the episode that follows he is evidently alone. There is also a doublet in v. 35 that repeats in a variant form the command and actions in v. 20-21. When we separate the two sources, we see two different portraits of Balaam which were merged by the compiler of Numbers. In the Elohist narrative, Balaam was an altogether righteous person who consistently followed the word of God and is not described as sinful. In the Yahwist narrative, Balaam set out with bad intentions, angering Yahweh and it was only after his encounter on the road with the angel that Balaam repented and followed God. When the two stories were grafted together, the disobediant Balaam disappeared and Yahweh is made to appear inexplicably wishy-washy. But a separate stream of tradition in Deuteronomy and the Deuteronomist History also posits Balaam as initially lacking good intentions:
"No Ammonite or Moabite may enter the assembly of the Lord because they hired against you Balaam son of Beor from Pethor of Mesopotamia, to curse you. Nevertheless Yahweh your God would not hearken to Balaam but Yahweh your God turned the curse into a blessing for you" (Deuteronomy 23:3-5).
"Then Balak the son of Zippor, king of Moab, rose and fought against Israel, and he sent and invited Balaam the son of Beor to curse you, but I would not listen to Balaam; therefore he blessed you, so I delivered you out of his hand" (Joshua 24:9-10).
These accounts conflict with the Elohist account but conform well with J. It is also interesting that while E is thought to have a northern Israelite provenance, J has a southern Judean origin -- the same as in Deuteronomy and the Deuteronomical History (of which Joshua forms a part). Jewish tradition later ran with the negative assessment of Balaam (Nehemiah 13:1-3; Philo, Moses 1:267-268; Josephus, Antiquities, 118; m. Abot 5:19; Targum Neophyti, Num. 22:30), which also was used in the NT as a moral example despite the fact that Numbers gave an overall positive account of Balaam (cf. 2 Peter 2:15-16; Jude 11; Revelation 2:14). More details can be found in my discussion of this matter in .
Then there are the actual oracles that appear in Numbers 23-24. These are undoubtedly of a more ancient and originally independent origin though they were mediated through their inclusion in J and E; thus we see that the two prophecies in 23:18-24 and 24:3-9 are versions of the same oracle, though it is unclear which document they originally derived from. Some genuinely archaic and distinctively Canaanite features of these oracles (absent in the preceding narrative) include: (1) The use of El instead of 'lhym or yhwh as the name of God (cf. 23:22; 24:4, 8, 16), (2) the use of the epithet Shaddai (sdy) to refer to El (cf. 24:4, 16), (3) animalistic imagery that is used to describe El, particularly his horns "like a wild ox" (cf. 23:22; 24:8), (4) archaic syntactic forms such as yiqtol past tense forms in (23:7), waw in possessed forms in 23:18, plural forms of prepositions in 24:6, and full-root conjugation of verbs in 24:6, (5) archaic vocabulary such as tswr "hill, mountain" in 23:9 and drk "rule, govern" in 24:17 which are paralleled in Ugaritic texts, and (6) the allusion to the twelfth-century B.C. invasion of the Sea Peoples in 24:23-24. Though archaic, the clear allusions to the Moabite wars of Saul and David (Numbers 24:17; cf. 1 Samuel 14:47; 2 Samuel 8:2) point to a much later date during the Judahite dynasties (e.g. eighth to sixth centuries B.C.).
THE EIGHTH CENTURY B.C. BOOK OF BALAAM BAR-BEOR
We are however fortunate to have a completely separate and extrabiblical source for traditions on Balaam: the remarkable eighth-century BC inscriptions discovered by H. Franken in 1967 in Deir 'Alla (in the ancient Valley of Succoth, in Gilead) which related excerpts from the spr Bl'm br-B'r "Book of Balaam, son of Beor". The plaster fragments date before the destructions of Tiglath-Pileser III (734-732 BC) and most likely date to around 800 BC. They are thus older than the narrative material in Numbers on Balaam, and likely older than the poetic material as well.
These fragments of the Book of Balaam show many similarities with the poetic and narrative material in Numbers. The inscription begins with the words: "The misfortunes [related in the] Book of Balaam, son of Beor. A divine seer was he ('s chzh 'lhn h')" (COS 2.27, line 1). The word chzh "seer" is related to mchzh "vision" which is associated with the biblical Balaam who is said to "behold the vision (mchzh) of Shaddai" (Numbers 24:3, 16). The emphatic "A divine seer was he" ('s chzh 'lhn h') is also paralleled in 1 Kings 13:26 which says regarding a prophet: "A man of God was he ('s h-'lhym h')". After this brief description of Balaam as a "divine seer," the inscription next relates the theophany he received one evening:
 "The gods ('lhn) came to him at night. And he beheld a vision in accordance with El's utterance. They said to Balaam, son of Beor: 'So will it be done, with naught surviving, no one has seen the likes of what you have heard!' " (COS 2.27, lines 1-4).
Here the gods are messengers of El's divine edict, much like the angels of later Jewish religion. Note that they approach Balaam during the night, just as what we find regarding 'lhym in Numbers 22:20: "God ('lhym, or "the gods") came to Balaam during the night". This raises the possibility that the legend used by the Elohist originally referred to "gods" and not "God". Here Balaam beholds a "vision" (mchzh) which as noted above is the same verb used in Numbers 24:3, 16, and it is a message of the god El which the gods relate to him. The word ms' "utterance" is the same as Hebrew mss' which frequently occurs in the OT to refer to prophetic utterances or oracles (cf. Isaiah 13:1; 15:1; 19:1; 21:1). Although the oracle itself it not related directly (being saved for later for dramatic effect), it is clearly an oracle of an impending disaster like that related to Ut-Naptishtim regarding the Flood or Abraham regarding Sodom and Gomorrah. The inscription relates what happened next:
 "Balaam arose on the morrow. He summoned the heads of assembly unto him, and for two days he fasted, and wept bitterly. Then his intimates entered into his presence, and they said to Balaam, son of Beor: 'Why do you fast, and why do you weep?' Then he said to them, 'Be seated, and I will relate to you what the Shaddai-gods (sdym) have planned, and go, see the acts of the gods!' " (COS 2.27, lines 4-7).
The Shaddai-gods refer to divine beings who inhabit mountains, or associated with them in myth. In the Canaanite Baal Epic, each of the major gods reside at their own holy mountain (including El, Baal, Yamm, Anat), and the divine council of the lesser deities also resides on a mountain (please see  for more information). In Hebrew, Shaddai is closely associated with El and in Ugaritic literature "Shaddai" also occurs as an epithet of El. In the Yahwist oracle of Balaam in Numbers 24, we thus read:
"The oracle of Balaam son of Beor, the oracle of the man with far-seeing eyes, the oracle of one who hears the word of El. He sees what Shaddai makes him see, receives the divine answer, and his eyes are opened" (Numbers 24:3-4).
In the Deir 'Alla inscription, Balaam next relates the vision he received from the gods:
 "The gods have banded together, the Shaddai-gods have established a council (mw'd). And they have said to the goddess Shagar: 'Sew up, close up the heavens with dense cloud, that darkness exist there, not brilliance.' Obscurity and not clarity, so that you instill dread in dense darkness. And -- never utter a sound again!' It shall be that the swift and crane will shriek insult to the eagle, and a nest of vultures shall cry out in response. The stork, the young of the falcon and the owl, the chicks of the heron, sparrow and cluster of eagles, pigeons and birds, the fowl in the sky. And a rod shall flay the cattle; where there are ewes, a staff shall be brought. Hares, eat together! Freely feed, O beasts of the field! And freely drink, asses and hyenas!" (COS 2.27, lines 7-13)
In Ugaritic myth, m'd or mw'd refers to the divine council of the seventy sons of El and Asherah who reside on a holy mountain analogous to the Mount Olympus of Greek mythology (cf. KTU 1.15 II 7, 11). Psalm 82:1-6 and 89:5-10 also refer to this heavenly assembly of the gods, Ezekiel 28:2, 14, 16 refers to El sitting in the "dwelling of the gods" and on the "holy mountain of the gods (hr qds 'lhym)", and Isaiah 14:13-14 refers to the "stars of El (kwkby-'l)," a poetic description of the lesser gods, as located on the "mount of assembly (hr-mw'd)," the same word in the Baal Epic and in the Book of Balaam. But the mw'd in the above quote is not an allusion to El's divine council. These Shaddai-gods, or mountain-gods, are described as setting up their own council and later on we see clearly that they are rebelling against El and especially the goddess Shagar. These renegade gods are thus analogous to the fallen angels of 1 Enoch 6:6-7 and subsequent tradition describes an earthly assembly of renegade angels on Mount Hermon:
"And they were altogether two hundred; and they descended into 'Ardos, which is the summit of Hermon . And they called the mount Armon, for they swore and bound one another by a curse. And their names are as follows: Semyaz, the leader of Arakeb, Rame'el, Tam'el, Ram'el, Dan'el, Ezeqel, Baraqyal, As'el, Armaros, Batar'el, Anan'el, Zaqe'el, Sasomaspwe'el, Kestar'el, Tur'el, Yamayol, and Arazyal." (1 Enoch 6:6-7)
In the Book of Balaam, the Shaddai-gods "established, set up" (ntsbw) a divine council and this verb curiously also occurs in Psalm 82:1 which says that "God stands up (ntsb) in the assembly of El". At the council, the gods force the goddess Shagar to curse the heavens, unleashing primeval darkness on the earth. Later on in the book, we encounter the full name of this deity as Shagar-and-Ishtar (sgr-w-'str) which suggests a conflation of Ishtar (Athtart or Astarte) with Venus. In Akkadian and Canaanite mythology, Athtar and Athtart were male and female counterparts of the planet Venus and both were responsible for terrestial irrigation of water. The linking of the two names evokes the repeated biblical expression "the issue (sgr) of your herds and the fertility ('strt) of your flocks" in Deuteronomy 7:13, 18:51; 28:4. The sewing up of the heavens that Shagar is instructed to do recalls the frequent description of the heavens in the Bible as a tent flap or garment (cf. Psalm 102:25-27, 104:2; Isaiah 34:4, 50:3), and the verb skr "shut up, close up" is employed in Genesis 8:2 to describe the shutting of the wells of the Deep after the Flood. The connection between Shagar-and-Ishtar with Venus is also recalled in the following statement: "Sew up, close up the heavens with dense cloud, that darkness exist there, not brilliance (ngh)." In post-exilic and rabbinical Hebrew texts, nwgh or nogah is the name given to Venus. This would explain why Shagar is given the task of darkening the land. The effect would be to the detriment of a wide variety of birds (mostly unclean birds from Leviticus 11 and Deuteronomy 14), and the beasts of the field are threatened with a rod or staff (cf. Balaam's oracle in Numbers 24:17 of the sceptre crushing brows and skulls).
The text that follows is more fragmentary, but it is clear what happens next. Balaam acts to save the goddess and the land through the offerings and divinations he recommends:
 "Heed the admonition, adversaries of Shagar-and-Ishtar! ... To skilled diviners shall one take you, and to an oracle, to a perfumer of myrrh and a priestess, who covers his body with oil, and rubs himself with olive oil. To one bearing an offering in a horn, one augurer after another, and yet another." (COS 2.27, lines 13-14)
The feminine nouns in this text shows that all the listed diviners and practitioners were women, which is appropriate in the case of the female deity. The adversaries of the goddess were then afflicted by the priestesses: "They heard incantations from afar, then disease was unleasehed and all beheld acts of distress. Shagar-and-Ishtar did not [sew up the heavens], the piglet drove out the leopard" (COS 2.27, lines 14-16), that is, domestic animals drove out wild beasts and order and calm was restored. Thus, Balaam son of Beor helps save the day.
The Deir 'Alla inscriptions include another Balaam oracle, concerning El building a necropolis in Sheol for the dead kings, but it is too fragmentary to discern the story behind this episode (COS 2.27, II, lines 6-15). The Deir 'Alla texts from the Book of Balaam show that a living, vibrant tradition about Balaam existed in Israel and Judah before the biblical texts were compiled into Numbers (and almost certainly from the earlier Canaanites and Moabites), and show that there is much to the tradition beyond what the Bible has to say.