In 1200 BC, the city-state of Ugarit was destroyed by The Sea Peoples — a group of warriors and raiders, from unknown locations, who ravaged ancient civilizations on the Mediterranean Sea.
With the Sea People’s violent destruction of Ugarit, and the city-state never being resettled, many of that civilization’s cuneiform records became preserved in rubble. Between 1930 and 1933, six of these cuneiform tablets were discovered in the house of a priest-scribe identified as Ilmilku (Elimelech). They have come to form what academics refer to as the Ugarit Baal Cycle, a grand narrative which functions as an origin story for the Mesopotamian god Baal (god of storms / weather).

The first section of Baal’s story identifies El, (the bull), as the supreme god / leader of the universe who rules over an assembly of other gods. One of these gods, called Yam, who is also called Nahar, (the sea or the river), seeks to become El’s vice regent — he desires to be King of gods, and rule mankind for and in behalf of El — directly underneath him in seniority. El support’s Yam in this claim.
However, Baal also desires this honor. He fights against Yam. With the aid of his mother, his sister, and Kothar-wa-Khasis, a builder-god, Baal defeats Yam (sometimes spelled Yamm) through battle. The storms control the seas. Baal becomes King of Gods underneath El. He brings order to the cosmos, and is allowed to build himself a temple at the top of the mountain on which El reigns.
After defeating Yam, Baal’s primary enemy becomes Moth (a.k.a Death). Their fighting goes back and forth until Death overcomes Baal, who is laid to rest in his mountain home. However, perhaps with aid from his sister Anat, Baal is resurrected, and continues his fight against Death, until finally overcoming it. He builds himself a window in his temple / home and from there speaks to the people in the earth.
There is 100 years of academic writings / research talking about how the story of Baal was retconned by the Israelites and Yahweh. Hugh Nibley would say that the story of Baal is a bastardization of an even more ancient / older story, which perhaps came from the Jebusites, or the the children of Moses themselves.