וַיְגָ֤רֶשׁ שְׁלֹמֹה֙ אֶת־אֶבְיָתָ֔ר מִהְי֥וֹת כֹּהֵ֖ן לַֽיהוָ֑ה לְמַלֵּא֙ אֶת־דְּבַ֣ר יְהוָ֔ה אֲשֶׁ֥ר דִּבֶּ֛ר עַל־בֵּ֥ית עֵלִ֖י בְּשִׁלֹֽה׃ (פ)
Salomão, pois, expulsou Abiatar, para que não fosse sacerdote do SENHOR, assim cumprindo a palavra que o SENHOR tinha dito acerca da casa de Eli em Siló.
From David to Destruction
The idea that Hashem manipulates the actions of a king is hardly unique to Rechav'am. Hashem manipulates the heart of Paroh, Sichon, and even Shlomo HaMelech (to bring about the punishment accorded to the descendants of Eili the Kohein, see Melachim I 2:27). Hashem clearly manipulates the heart of Haman and Achashveirosh in Megillat Esther. Indeed, Mishlei 21:1 states “Lev Melech BeYad Hashem,” “the king’s heart is in the hands of Hashem.”
Rashi
For I honor those who honor Me. Pinchas' descendants who honored Me at Shittim.26Bamidbar 25:7-8. And this happened in the days of Shlomo, that when the Temple was built, Shlomo dismissed Evyosor from being a kohein [gadol] to 'ה, fulfilling the word of 'ה which He had spoken concerning Eili's family.27 I Melochim 2:27. And Tzadok became the kohein gadol, because he was of Pinchas' descendants; he is so listed in the genealogical records in Divrei Hayomim.28I Divrei Hayomim 6:35-38.