I quote from Ibn Ezra’s exposition of Psalm 2, which can be accessed here:Ibn Ezra on Psalms 2:1.
All emphasis will be mine.
2:1
למה רגשו - הנכון בעיני: כי זה המזמור חברו אחד מהמשוררים על דוד ביום המשחו, על כן כתוב: אני היום ילדתיך, או על המשיח.
Why do nations assemble (לָ֭מָּה רָגְשׁ֣וּ - lamah ragshu): What seems correct in my eyes is that this psalm was composed by one of the poets concerning David on the day he was anointed. Therefore, it is written [later in verse 7], "This day I have begotten you." Or [alternatively, the psalm is] about the Messiah.
ורגשו - כמו חברו וכמוהו מרגשת פועלי און.
And ragshu [translated here as "assemble," but can also mean rage/tumult] is like "joined together" (chavru). Similar to it is [the phrase in (Psalm 64:3Thou hast protected me from the assembly of the malignant; from the multitude of the workers of iniquity.)] "from the assembly/tumult (mirgeshet) of the workers of iniquity."
ולמ"ד לאמים – שורש כמו: ולאם מלאם יאמץ.
And the Lamed [prefix] of le'umim (לְאֻמִּ֗ים - peoples): [This Lamed is part of the] root [of the word], as the singular form is le'om (people/nation). As in (Genesis 25:23And he answering, said: Two nations are in thy womb, and two peoples shall be divided out of thy womb, and one people shall overcome the other, and the elder shall serve the younger.): "and one people (u-le'om) shall be stronger than the other people (mi-le'om)."
יהגו ריק - בדיבור כמו: ולשוני אם יהגה רמיה והדבור ננתקה את מוסרותימו.
Plot/utter vain things (יֶהְגּוּ־רִֽיק - yehgu rik): [This refers to plotting] through speech (be-dibur). Similar [usage of hagah for speech is found], as in [verses like (Psalm 35:28And my tongue shall meditate thy justice, thy praise all the day long.)] "And my tongue shall speak (tehgeh) Your righteousness." And the [specific vain] speech [they utter] is [revealed in verse 3]: "Let us break their bonds asunder."
2:2
יתיצבו - עם הגוים המלכים והסגנים יחדו ונוסדו מגזרת סוד, והנה על דרך: ריבה ה' את יריבי שהוא מגזרת רב והוא מעלומי העי"ן, ריב וכן סוד מגזרת סיד.ויו"ד יריבי הפוך והוא תאר חסר, או הוא מטעם יסוד על דעת האומר שזה המזמור שאמר המשורר נאמר על דוד, או הוא התנבא על עצמו, הנה מצאנו גוים רבים היו תחת יד דוד. ואם על המשיח הדבר יותר ברור.
They take their stand (יִ֥תְיַצְּב֨וּ - yityatzvu): The kings and the regents (roznim - also nobles/rulers) [act] together with the nations [mentioned in v. 1]. And nosdu-yachad (נוֹסְדוּ־יָ֑חַד - they intrigue/conspire together): [Nosdu] is from the root sod (סוֹד - secret, council, conspiracy). Behold, this follows the pattern of (Psalm 35:1For David himself. Judge thou, O Lord, them that wrong me: overthrow them that fight against me.) "Contend (Rivah), O LORD, with those who contend with me (yerivai)," where [yerivai] is from the root rav (רב - contend, strive), which is a hollow root (me-'alumei ha-ayin - i.e., middle root letter is Vav or Yod) related to the noun riv (רִיב - strife). [Ibn Ezra implies a similar relationship between the verb nosdu and the noun sod]. The yod in yerivai is transformed and it represents a defective adjectival form. Alternatively, [nosdu] is from the root yesod (יְסוֹד - foundation), [implying they establish a common foundation or plan together]. According to the opinion that this psalm, which the poet composed, was said about David (or that he [David] prophesied about himself)—behold, we find that many nations were under David's control [making such a rebellion historically plausible]. And if [the psalm is] about the Messiah, the matter [of widespread opposition] IS EVEN CLEARER.
וטעם על ה' - שיצאו מתחת יד שקול הדעת שנטע השם בלב כל אדם.
And the meaning of "against the LORD" ('עַל־ה - al Ad-nai): Is that they have departed from the control of the sound judgment (sikul ha-da'at) which God implanted in the heart of every person.
ועל משיחו - שלא יכחישו לו ויסורו אל משמעתו לתת לו מס.
And [the meaning of] "and against His anointed" (וְעַל־מְשִׁיחֽוֹ - ve-al meshicho): Is that they should not deny him [or 'deal falsely with him'], but rather submit (yasuru el) to his authority/obedience (mishma'ato) to pay him tribute (mas).
2:3
ננתקה את מוסרותימו - מגזרת מוסר.
Let us break their cords (nenattekah et mosroteimo): [The word mosroteimo - their cords/bonds] is from the root musar (מוּסָר - discipline, bond, instruction).
גם עבותימו – חבלים עבותים. והטעם אחד במלות שונות, כי כן דרך צחות, כמו: מה אקוב ומה אזעום.
Also their ropes (גַּם עֲבֹתֵימוֹ - gam avoteimo): Means thick ropes (chavalim avotim). The meaning [of mosrot and avot] is one and the same, [expressed] with different words. For this is a manner of rhetorical elegance (derekh tzachut), like [in (Numbers 23:8How shall I curse him, whom God hath not cursed? By what means should I detest him, whom the Lord detesteth not?)]: "How shall I curse (mah ekov)... and how shall I denounce (umah ez'om)." [Using synonyms in parallel clauses].
יושב - בעבור שהזכיר יתיצבו מלכי ארץ אמר כנגדם יושב בשמים שהם למעלה על האדם. אמר הגאון: כי טעם ישחק שישימם לשחוק וללעג. והנכון שהשם ברא הגשם שהוא העצם והצורות שהם מקרים כל אשר יעשה האדם או יצייר צורות חיות, ושמו נשגב לבדו מהיותו ביסוד ואף כי במקרה, רק בעבור שהמדבר אדם וככה השומע, דברה תורה כלשון בני אדם להבין השומע וככה עשו שהארץ כדמות אדם, ותפתח הארץ את פיה, מירכתי ארץ.
He who sits (יוֹשֵׁב - yoshev) [referring to yoshev ba-shamayim - "He who sits in the heavens" in v. 4]: Because Scripture mentioned [in v. 2] "kings of the earth take their stand" (yityatzvu malkhei eretz), it states, in contrast to them, "He who sits in the heavens," which are above man. The [Rav Saadia] Gaon said: That the meaning of He will laugh (יִשְׂחָק - yischak) [v. 4] is that He will make them into an object of laughter and derision (sechok u-la'ag). And the correct [view] is: That HaShem created substance/matter (ha-geshem), which is the essence, and the forms (ha-tzurot), which are accidents/attributes. [These philosophical terms contrast with] whatever man does or the images of living things he forms [in his mind]. His Name [i.e., God Himself] alone is too exalted to be [described] in terms of substance/essence, let alone accident/attribute. However, because the speaker [of Scripture] is human, and likewise the hearer, the Torah spoke in the language of human beings (dibrah Torah ki-leshon bnei adam) so that the hearer may understand. And similarly, they treated the earth as if it had human form, [as in verses like]: "And the earth opened its mouth" (Numbers 16:32And opening her mouth, devoured them with their tents and all their substance.), [and phrases like] "from the recesses/ends (mi-yarketei) of the earth" (e.g., Jeremiah 6:22Thus saith the Lord: Behold a people cometh from the land of the north, and a great nation shall rise up from the ends of the earth.). [Thus, "laughing" is anthropomorphic language used for human understanding].
ולמו - כמו להם.
And -lamo [in yil'ag lamo - "will mock them" in v. 4]: Is like lahem (לָהֶם - to/for them) [an archaic pronoun form].
ומלת לעג - לעולם עם אות למד, כמו ילעיגו לי על כן ואויבינו ילעגו למו, דרך כינוי כאשר אפרש.
And the word la'ag (לַעַג - scorn, derision): Is always [found] with the letter Lamed [as a prefix to the object being scorned], like (Psalm 22:8All they that saw me have laughed me to scorn: they have spoken with the lips, and wagged the head.) "they mock me" (yal'igu li) [and (Psalm 80:7Thou hast made us to be a contradiction to our neighbours: and our enemies have scoffed at us.)] "therefore our enemies mock them" (ve-oyveinu yil'agu lamo). [This is] a manner of expression (derekh kinuy - perhaps meaning 'idiomatic usage' or 'reference'), as I will explain [elsewhere, or referring perhaps to the specific usage here].
2:5
אז - יש אומרים: ידבר כמו יאבד, כמו ותדבר את כל זרע המלוכה שהוא לשון מות כמו אהי דברך מות, כמו: ותדבר את כל זרע המלוכה כי כתוב בספר אחר ותדבר מגזרת דבר כבד מאד.
Some say (yesh omrim): [That the word] He will speak (yedaber) means "He will destroy" (ye'abed). [They compare it to] (II Kings 11:1Now Athalia, the mother of Ochozias, seeing that her son was dead, arose and slew all the royal seed.) "and she destroyed (va-tedaber) all the royal seed." This [verb dabar] is thus an expression of death (leshon mavet), similar to (Hosea 13:14I will deliver them out of the hand of death. I will redeem them from death: O death, I will be thy death; O hell, I will be thy bite: comfort is hidden from my eyes.) "O Death, where are your plagues/destruction (devarekha)". [They argue further] that it is written in another book [referring again to the account in Kings or a related source] that va-tedaber ("and she destroyed") is from the root [meaning] a very heavy plague/matter (davar kaved me'od).
אלימו - החזקים כמו ואת אילי הארץ לקח ואיננו נכון, כי אילי הארץ על דרך אבירי בשן, גם הוא ביו"ד כי הוא מגזרת אין איל. והנכון: כי ידבר כמשמעו ואלימו כמו אליהם ועלימו כמו עליהם, וככה ידבר אליהם למה רגשו גוים.
[Regarding] Eleimo (אֵלֵימוֹ - to them): [Some interpret this as referring to] the strong ones (ha-chazakim), comparing it to (Ezekiel 17:13And he shall take one of the king's seed, and make a covenant with him, and take an oath of him. Yea, and he shall take away the mighty men of the land,) "and he took the mighty (eilei) of the land." However, this is not correct (ve-eineno nakhon). Because "the mighty (eilei) of the land" is used metaphorically [for leaders], in the same manner as "the strong bulls (abbirei) of Bashan" (Psalm 22:13Many calves have surrounded me: fat bulls have besieged me.). Also, [the word eil meaning mighty/ram] has a yod (איל) as it is derived from [a root related to] ayil (ram/strength). [Therefore, eleimo here, without the yod, is not referring to 'the mighty ones'].
2:6
ואני נסכתי - המלכתי והטעם שהוא נסיכי כמו חמשת מלכי מדין שהיו נסיכי סיחון. ודע כי הסמיכה פעם היא מהנכבד לנבזה והפך הדבר כמו אתה הוא מלכי אלהים.
But I have installed (וַאֲנִי נָסַכְתִּי - va'ani nasakhti): [This means] I have made king (himlakhti). And the meaning is that he is My prince (nesikhi). Similar [usage connecting this root to rulership is found] regarding "the five kings of Midian who were princes (nesikhei) of Sihon" (Joshua 13:21And all the cities of the plain, and all the kingdoms of Sehon king of the Amorrhites, that reigned in Hesebon, whom Moses slew with the princes of Madian: Hevi, and Recem, and Sur and Hur, and Rebe, dukes of Sehon inhabitants of the land.). And know that the construct state (semikhut - e.g., "king of X") sometimes proceeds from the honored [noun] to the less esteemed [noun], and sometimes the opposite, like [in (Psalm 44:5Thou art thyself my king and my God, who commandest the saving of Jacob.)] "You are my King, O God" (Atah hu Malki Elokim) [where "God" is the more honored noun].
ואני נסכתי מלכי - ה' הוא נחלתו והם עמך ונחלתך וכמוהו להשתחות למלך ה' צבאות - שהוא המשיח, כדרך וישתחוו לו כל מלכים, כי אילו היה על השם היה הלמד פתוח.
"But I have installed My king" (va'ani nasakhti malki): [This relationship is like how Israel is God's portion, e.g.,] "Ad-nai is his inheritance" (Deuteronomy 10:9Wherefore Levi hath no part nor possession with his brethren: because the Lord himself is his possession, as the Lord thy God promised him.) and [conversely] "They are Your people and Your inheritance" (Deuteronomy 9:29Who are thy people and thy inheritance, whom thou hast brought out by thy great strength, and in thy stretched out arm.). [The king is God's designated representative]. And similar to it [the concept of a designated king related to God] is [the phrase in (Zechariah 14:16-17And all they that shall be left of all nations that came against Jerusalem, shall go up from year to year, to adore the King, the Lord of hosts, and to keep the feast of tabernacles.)] "to bow down to the King, Ad-nai of hosts" (le-hishtachavot le-melekh Ad-nai tzeva'ot). [This title "King, Ad-nai of hosts" in Zechariah] refers to the Messiah. This is in the manner of (Psalm 72:11And all kings of the earth shall adore him: all nations shall serve him.) "And all kings shall bow down to him" (ve-yishtachavu lo kol melakhim). For if [the phrase le-melekh ("to the King") in (Zechariah 14:16And all they that shall be left of all nations that came against Jerusalem, shall go up from year to year, to adore the King, the Lord of hosts, and to keep the feast of tabernacles.)] were referring [directly] to HaShem, the Lamed [prefix] would have a patach vowel [i.e., it would likely be לַמֶּלֶךְ - la-melekh].
2:7
אספרה - דברי דוד עם הנבואה שלו, או דברי המשורר מדבר בעדו.
Let me tell (אֲסַפְּרָ֗ה - asapperah): These are the words of David along with his prophecy; or, the words of the poet [who composed the psalm] speaking on his [David's, or the Messiah's] behalf.
וטעם אל חק – זה שאספר אשים אותו לחק שיסופר והוא אמר אלי בני אתה לעבוד את השם, כבן יכבד אב.
[Regarding] the decree (אֶֽ֫ל־חֹ֥ק - el chok): [The meaning is:] This which I will tell, I will establish it (asim oto) as a decree (le-chok) that should be related. And this [decree] is: He said to me, "You are My son" – [meaning] to serve HaShem, just as a son honors a father.
אני היום ילדתיך - כמו: צור ילדך תשי.
I have fathered you this day (אֲ֝נִ֗י הַיּ֥וֹם יְלִדְתִּֽיךָ - ani hayom yelidtíkha): This is similar to (Deuteronomy 32:18Thou hast forsaken the God that begot thee, and hast forgotten the Lord that created thee.): "The Rock who fathered you (tzur yeladkha), you forgot."
2:8
שאל - מנהג האב להנחיל את הבן, על כן אמר: ואתנה גוים נחלתך.
Ask (שְׁאַ֤ל - she'al): It is the custom (minhag) of a father to give an inheritance (le-hanchil) to the son; therefore He said, "and I will make the nations your inheritance (nachalatékha)."
אפסי ארץ - מגזרת: כי אפס כסף מקומות נגזרים מישוב.
Ends of the earth (אַפְסֵי־אָֽרֶץ - afsei-aretz): From the same root (mi-gizrat) as [in (Genesis 47:15And when the buyers wanted money, all Egypt came to Joseph, saying: Give us bread: why should we die in thy presence, having now no money?)] "for the money is finished (ki afes kasef)." [It refers to] places cut off (negzarim) from settlement (mi-yishuv).
2:9
תרועם - תשברם, והיה העי"ן ראוי להדגש לולי היותו מהגרון כמו תשוכם תסובם:
You will break them (תְּרֹעֵם - tero'em): [This means] You will shatter them (teshabberem). The [letter] Ayin (ע) [the second root letter of ר-ע-ע] would properly have a dagesh (doubling dot) [in this verb stem], were it not for the fact that it is a guttural letter ("from the throat"). [This absence of an expected dagesh is] similar to [forms like] tesokhem (תְּשׂוֹכֵם) and tesovem (תְּסוֹבֵם), [where the middle root letter also lacks a dagesh].
בשבט ברזל - החרב תנפצם הפך רגשו גוים.
With a rod of iron (בְּשֵׁבֶט בַּרְזֶל - be-shevet barzel): [This refers metaphorically to] the sword (ha-cherev). You will shatter them (תְּנַפְּצֵֽם - tenappetzem): [This outcome is] the opposite of (hefekh) [what the nations intended when] "nations assemble (ragshu goyim)" [in verse 1].
2:10
ועתה מלכים - הם מלכי ארץ.
And now, O kings (וְ֭עַתָּה מְלָכִ֣ים - ve-attah melakhim): These are the "kings of the earth" [mentioned in verse 2].
והשכילו - הפך על ה'
Be prudent (הַשְׂכִּ֑ילוּ - haskílu): [This is] the opposite of [acting] "against Ad-nai" [which they did in verse 2].
והוסרו - הפך מוסרותימו.
Accept discipline (הִוָּסְר֗וּ - hivvaseru): [This is] the opposite of [saying in verse 3] "[Let us break] their cords (mosroteimo)."
ושפטי ארץ - הם רוזנים.
You rulers/judges of the earth (שֹׁ֣פְטֵי אָֽרֶץ - shoftei aretz): These are the "regents" (roznim) [mentioned in verse 2].
2:11
עבדו - הפך דבריהם ננתקה ועבודת השם ליראה ממנו ולא יעברו פיו.
Serve (עִבְדוּ - ivdu): [This command is] the opposite of their words [in verse 3], "Let us break (nenattekah) [their cords]." And the service of HaShem [should be] out of fear (le-yir'ah) of Him, and [so as] not to transgress His command (lit. His mouth).
וגילו - אם בא גיל אל תשכחו שתרעדו מפחד השם.
And rejoice (וְגִילוּ - ve-gilu): If joy (gil) comes, do not forget that you should tremble (tir'adu) out of fear of HaShem. [Explaining the combination "rejoice with trembling"].
ויש אומרים: וגילו - כמו תגילו על דרך: עלה ומות בהר, פרו ורבו שהוא ברכה על דגי הים. והטעם: שתגילו אם רעדתם מהשם.
And some say (v'yesh omrim): [That the imperative form] rejoice (gilu) is like [the future/imperfect form] "you will rejoice" (tagilu). [This follows] the pattern of [sequences where imperatives imply a consequence or condition, like (Deuteronomy 32:50When thou art gone up into it thou shalt be gathered to thy people, as Aaron thy brother died in mount Hor, and was gathered to his people:)] "Ascend (aleh)... and die (u-mut) on the mountain," or [like the blessing in (Genesis 1:22And he blessed them, saying: Increase and multiply, and fill the waters of the sea: and let the birds be multiplied upon the earth.)] "Be fruitful (p'ru) and multiply (u-rvu)," which is a blessing upon the fish of the sea. And the meaning [according to this second view] is: That you will rejoice (tagilu) if you have [first] trembled (ra'adtem) out of [fear of] HaShem.
2:12
נשקו בר - הנה עבדו את ה' כנגד על ה'.
Kiss the son (נַשְּׁקוּ־בַר - nashku var): Behold, "Serve Ad-nai" [from v. 11] corresponds to [the rebellion] "against Ad-nai" [in v. 2]. And "Kiss the son" [nashku var] corresponds to [the rebellion] "against His anointed" [in v. 2].
ונשקו בר – כנגד על משיחו. והנה פירוש בר, כמו: מה ברי ומה בר בטני. וכן כתוב: בני אתה ומנהג גוים בעולם לשום ידיהם תחת יד המלך כאחי שלמה, או העבד תחת ירך אדוניו, או לנשק את המלך, וזה המנהג עד היום בארץ הודו.
And behold, the interpretation of bar is "son," as in (Proverbs 31:2What, O my beloved, what, O the beloved of my womb, what, O the beloved of my vows?): "What, my son (beri), and what, O son (bar) of my womb?" And so it is written [in verse 7], "You are My son (b'ni atah)." And the custom of nations in the world is to place their hands under the hand of the king (like the brothers of Solomon [showing submission, cf. (I Chronicles 29:24And all the princes, and men of power, and all the sons of king David gave their hand, and were subject to Solomon the king.)]), or [for] the servant [to place his hand] under the thigh of his master [for an oath, cf. (Genesis 24:2And he said to the elder servant of his house, who was ruler over all he had: Put thy hand under my thigh,)], or to kiss the king. And this custom [of kissing the ruler] exists until today in the land of India.
ופן יאנף - שב אל השם הנזכר בפסוק הראשון ואם הוא רחוק כמו תבלעמו ארץ איננו שב אל מלת מי כמוכה באלים רק אל אמר אויב, וככה והקימו את המשכן עד בואם.
Lest He be angered (פֶּן־יֶאֱנַף - pen ye'enaf): [The pronoun "He"] refers back to HaShem [God] mentioned in the previous verse ("Serve Ad-nai"). Even if the antecedent is distant, [this occurs elsewhere], like [in (Exodus 15:12Thou stretchedst forth thy hand, and the earth swallowed them.)] "the earth swallowed them" – ["them"] does not refer back to the [immediately preceding] phrase "Who is like You among the gods?" [v. 11] but rather to [the more distant] "[the] enemy said" [v. 9].¹ And similarly [in (Exodus 40:17-19And spread the roof over the tabernacle, putting over it a cover, as the Lord had commanded.), the fulfillment of actions] "and they erected the Tabernacle" [refers back to commands given much earlier].
ויש אומרים: כי נשקו – מגזרת נשק. והטעם נשקו כלי בר והנה בר כמו ברי לבב והיה ראוי להיותו בור או יהיה תקנו הבר או כלי הבר.
And some say (v'yesh omrim): That nashku is from the root neshek (נֶשֶׁק - arms, weaponry). And the meaning [would be]: Arm yourselves (nashku) with purity (var). And behold, bar [would then mean "pure"], like [in (Psalm 24:4The innocent in hands, and clean of heart, who hath not taken his soul in vain, nor sworn deceitfully to his neighbour.)] "pure (b'rei) of heart." [However, Ibn Ezra notes grammatical issues:] It properly should have been [the noun] bor (בֹּר - purity), or [the phrase would be] "equip (tiknu) the purity (ha-bor)" or "[take up] the weapon/vessel (k'li) of purity (ha-bor)."
ותאבדו דרך - תהיו אובדים מפאת הדרך כמו נובלת עליה, כי היא בעצמה איננה נובלת רק עליה נובלים, כי היא מהפועלים העומדים. ורבי משה הכהן אמר: כי דרך כמו מדרך כף רגל. וזה רחוק כי אין לו טעם.
And you perish [from the] way (וְתֹאבְדוּ דֶרֶךְ - ve-to'vdu derekh): [This means] you will be perishing because of the way (mi-pe'at ha-derekh). Similar [is the construction in (Isaiah 1:30When you shall be as an oak with the leaves falling off, and as a garden without water.)] "whose foliage fades" (novelet aleha, lit. 'fading its leaves') – for the [tree] itself does not fade, but its leaves fade. Because it [the verb avad - אבד, to perish] is one of the intransitive verbs (po'alim ha-omdim). And Rabbi Moshe Rabbi Moshe [ben Shmu'el Gikatilla] HaKohen said: That way (derekh) here is like "a foot's tread" (midrakh kaf regel) [from (Deuteronomy 2:5Take ye then good heed that you stir not against them. For I will not give you of their land so much as the step of one foot can tread upon, because I have given mount Seir to Esau, for a possession.), meaning a place to stand]. And this is far-fetched (rachok) because it has no sense/reason (ta'am). [Ibn Ezra rejects this interpretation].
כי יבער כמעט אפו - פועל יוצא כאש תבער יער כדרך אש אוכלה והפעולה חסר, כי אין צורך כי חרי האף נמשל לאש.
For His anger burns quickly (כִּי־יִבְעַר כִּמְעַט אַפּוֹ - ki yiv'ar kim'at appo): [The verb b'r - בער, burn] is [often] transitive (po'el yotze), like [in (Isaiah 9:17Therefore the Lord shall have no joy in their young men: neither shall he have mercy on their fatherless, and widows: for every one is a hypocrite and wicked, and every mouth hath spoken folly. For all this his indignation is not turned…)] "as fire burns (tiv'ar) the forest," in the manner of (Deuteronomy 4:24Because the Lord thy God is a consuming fire, a jealous God.) "a consuming fire (esh okhlah)." And [here] the object (ha-pe'ulah) is missing [i.e., it doesn't say what the anger burns], because there is no need [to state it], for burning anger (chari ha-af) is [already inherently] compared to fire.
What makes Ibn Ezra’s exegesis so remarkable is that he not alone interprets the phrase nashku bar in v. 12 as kissing the Son, meaning that the nations must worship the King as God’s begotten Son, he even applies to him the worship which the prophet Zechariah states the nations will eventually give to YHWH himself!
Note the verse Ibn Ezra cited:
“Behold, a day is coming for Yahweh when the spoil taken from you will be divided among you. Indeed, I will gather all the nations against Jerusalem to battle, and the city will be captured, the houses plundered, the women ravished, and half of the city will go forth in exile, but those left of the people will not be cut off from the city. Then Yahweh will go forth and fight against those nations, as the day when He fights on a day of battle. And in that day His feet will stand on the Mount of Olives, which is in front of Jerusalem on the east; and the Mount of Olives will be split in its middle from east to west by a very large valley so that half of the mountain will move toward the north and the other half toward the south. And you will flee by the valley of My mountains, for the valley of the mountains will reach to Azel; indeed, you will flee just as you fled before the earthquake in the days of Uzziah king of Judah. Then Yahweh, my God, will come, and all the holy ones with Him!... And Yahweh will be king over all the earth; in that day Yahweh will be the only one, and His name one... Then it will be that any who are left of all the nations that went against Jerusalem will go up from year to year to worship the King, Yahweh of hosts, and to celebrate the Feast of Booths. And it will be that whichever of the families of the earth does not go up to Jerusalem to worship the King, Yahweh of hosts, there will be no rain on them.” Zechariah 14:1-5, 9, 16-17Behold the days of the Lord shall come, and thy spoils shall be divided in the midst of thee. Legacy Standard Bible (LSB)
Contrary to Ibn Ezra’s objection, the context is explicit and unambiguous that the King that comes to dwell in Jerusalem and whom the nations must worship is not a mere human being. Rather, it is YHWH God Almighty himself!
Therefore, Ibn Ezra has ascribed to the Messianic King the unique, exclusive worship due to YHWH God!