I think I just came across the oldest known West Semitic version of the conflict myth in a mythological text from third-millenium B.C. Ebla (c. 2200-2000 BC):
"I have bound Habhaby. I have bound his tongue. I have found the barrier of his teeth. I have bound you on a black stone by the double doors and struck the Sea (tihamatim) with a reed. I have bound you by seven mighty contraptions. I have bound you by the zidanu and amana. I have bound you by the tails of the Sun and by the horns of the Moon. Seven youths and seven maidens are exalted, and [...] the Star (kabkabu). The bricklayer will lay the bricks by the double doors of Ellil, father of the gods and the Star has established him as representative to Ellil, father of the gods. Ellil, the father of the gods performs the magic. Spell of the Star. [...] I have bound you on Zazaum, O no-good one. [...] O Sun-god! May you lay the bricks and build the house of Ellil the father of the gods. [...] The Star is appointed as the emissary to Ellil the father of the gods. [...] The earth has confined the serpent (bashanu); O serpent in the sea (ba-tihamat)! [...] So says the magician Dagama [to the serpent]: 'I have smitten thee'. [...] May Hadd fetch the dazzling stone and the triple-garment for the Star [who was appointed to induce Ellil to perform the magic]". (ARET 5).
Very striking is the fact that the storm-god Ellil has his palace built after defeating the sea-serpent (bashanu, the same word that refers to Lotan in Ugaritic myth in KTU 1.5 i 1-5), the use of a word cognate to Hebrew thwm and Akkadian Tiamat, and that while contraptions, a reed, and celestial objects were used to bind and defeat Habhaby, Ellil uses magic through the person of Daguma to defeat the monster. As for the name Habhaby, it occurs in Ugaritic in unduplicated form in KTU 1.114 R 19-20 as the "creeping monster (hby) with horns and tail (b'l qrnm w dnb)" who attacks El after he drank in his palace and "El fell down as though dead, El was like those who go down into the underworld" (Asherah and Anat then cure him). One possibility is that the monster here is a prototype of Western conceptions of Satan, or a satyr-like monster. Pardee and Wyatt suggest that the name derives from Egyptian hpy, the deified Nile River worshipped in the incarnation of the Apis bull. He would thus provide the necessary horns and tail. Note that the description of the moon is consistent with the bull-iconography of Yarih and Sin in Assyrian and Mari/Nuzi texts.
For a full detailed discussion of this conflict myth in the OT and NT, especially with regard to Leviathan and Rahab, please see the following thread: http://www.jehovahs-witness.com/10/68098/1.ashx.