“As we have noted earlier, the inhabitants of the gloomy underworld are frequently called the Rephaim in the Old Testament (Job 26.5; Ps. 88.11 [ET 10]; Prov. 2.18, 9.18, 21.16; Isa. 14.9, 26.14, 19). Curiously, the Old Testament also uses the same name to describe part of the preIsraelite population of Canaan (Gen. 14.5, 15.20; Deut. 2.11, 20, 3.11, 13; Josh. 12.4, 17.15), but there is no agreement on what relation, if any, there is between the two usages. Some, for example, S. Talmon, have argued that there is no relationship between them. I am convinced, however, that there is a direct relationship and that the ethnic Rephaim derive from the underworld Rephaim. First, in the Old Testament the ethnic Rephaim are most particularly associated with the place Ashtaroth or Ashteroth-Karnaim in northern Transjordan (Gen. 14.5; Josh. 12.4; 13.12); the same place is attested in the Ugaritic texts as the seat of rp’u, the leader of the underworld rp’um. Thus, in the Ugaritic text KTU2 1.108.1 we read of rp’u. mlk. 7m, ‘Rp’u, king of eternity’ and he is described in lines 2-3 as ‘//. ytb. b’ttrt ‘il tpz bhdr’y, ‘the god who dwells in Ashtaroth, the god who judges at Edrei’ according to the translation now accepted by most Ugaritologists, with which I now concur. This too supports an ultimate connection between the underworld and ethnic Rephaim of the Bible, since on the one hand rp ‘um, of which rp’u is the singular, are elsewhere the spirits of the dead at Ugarit, whereas on the other hand, the reference to ‘the god who dwells in Ashtaroth, the god who judges in Edrei’ strikingly resembles one of the ethnic Rephaim, ‘Og, king of Bashan, one of the remnant of the Rephaim, who dwelt at Ashtaroth and at Edrei’ (Josh. 12.4; cf. Josh. 13.12). This therefore tells against the view of those such as J.R. Bartlett who see the Old Testament’s connection of the Rephaim with Transjordan as simply late and Deuteronomistic, appropriated from the southern Judahite tradition. Secondly, the same place, Ashtaroth, was the seat of the god Mlk in the Ugaritic texts (KTU21.100.41 and 1.107.42). Mlk is the same as the god known in the Old Testament as Molech, and as I have argued elsewhere (both in my book, and above), he was an underworld deity. His seat was in the valley of Hinnom (2 Kgs 23.10; Jer. 32.35), where fiery human sacrifices were offered. (Hence the later name for hell, Gehenna, literally ‘valley of Hinnom’.) Interestingly, the valley of Hinnom joins on to a valley known as the valley of Rephaim (Josh. 18.16). All this suggests that there is indeed a relationship between the underworld Rephaim and the ethnic Rephaim. It would appear that the concept of the ethnic Rephaim is derivative from that of the underworld Rephaim, since the latter are already attested at Ugarit in the second millennium BCE (the rp’um), as we have seen earlier. In keeping with the view expressed here that the divinized underworld Rephaim gave rise to the giant ethnic Rephaim, it may be pointed out that there are other analogies for this in the Old Testament. Thus, the giant Nephilim (Num. 13.33) are said to be the offspring of the sons of God and daughters of men in Gen. 6.1-4.”
Source: John Day, Yahweh and the Gods and Goddesses of Canaan, pp. 223-224. Kindle Edition.
 S. Talmon, ‘Biblical repa’im and Ugaritic rpu/i(m)\HAR 1 rpu/i(m)\HAR 1 49.
 See above, n. 102.
 J.R. Bartlett, ‘Sibon and Og, Kings of the Amorites’, VT 20 (1970), pp. 257-77 (268-71); A. Caquot, ‘Rephaim’, DBSup, X, cols. 344-57 (345-46).
 J. Day, Molech, pp. 45-55.
 For the evidence that the imagery of the fires of Gehenna derives from the fiery Molech sacrifices rather than an alleged burning rubbish dump in the valley of Hinnom, see J. Day, Molech, pp. 52-55.
 Cf. too Homer, Odyssey 11.240-332, Iliad 12.23, and Plato, Cratylus 33, for the notion that giants and heroes are the offspring of marriages between gods and humans.