Psalms 74:13-17 recounts a series of victories of Y-H-V-H. The first couplet documents victories in battle against both the Canaanite chaos sea snake [1] and the sea monster Leviathan [2]:
אַתָּ֤ה פוֹרַ֣רְתָּ בְעׇזְּךָ֣ יָ֑ם שִׁבַּ֖רְתָּ רָאשֵׁ֥י תַ֝נִּינִ֗ים עַל־הַמָּֽיִם׃
13 You divided the sea by your might; you broke the heads of the dragons in the waters. (NSRV)
אַתָּ֣ה רִ֭צַּצְתָּ רָאשֵׁ֣י לִוְיָתָ֑ן תִּתְּנֶ֥נּוּ מַ֝אֲכָ֗ל לְעָ֣ם לְצִיִּֽים׃
14 You crushed the heads of Leviathan; you gave him as food for the creatures of the wilderness.
Then turns to acts of creating day/night, waters, stars, and seasons:
אַתָּ֣ה בָ֭קַעְתָּ מַעְיָ֣ן וָנָ֑חַל אַתָּ֥ה ה֝וֹבַ֗שְׁתָּ נַהֲר֥וֹת אֵיתָֽן׃
15 You cut openings for springs and torrents; you dried up ever-flowing streams.
לְךָ֣ י֭וֹם אַף־לְךָ֥ לָ֑יְלָה אַתָּ֥ה הֲ֝כִינ֗וֹתָ מָא֥וֹר וָשָֽׁמֶשׁ׃
16 Yours is the day, yours also the night; you established the luminaries and the sun.
אַתָּ֣ה הִ֭צַּבְתָּ כׇּל־גְּבוּל֣וֹת אָ֑רֶץ קַ֥יִץ וָ֝חֹ֗רֶף אַתָּ֥ה יְצַרְתָּֽם׃
17 You have fixed all the bounds of the earth; you made summer and winter.
What is the connection between the victories against primordial monsters and the creation account portrayed here? Why does one follow the other? What sources is this drawing from (textual or otherwise)?
Heider, George C. (1999), "Tannîn", Dictionary of Deities and Demons in the Bible, 2nd ed.
Grønbæk, Jakob H., “Baal’s Battle With Yam — a Canaanite Creation Fight”, Journal for the Study of the Old Testament