Quoting Commentary for I Kings 11:8

וְכֵ֣ן עָשָׂ֔ה לְכָל־נָשָׁ֖יו הַנָּכְרִיּ֑וֹת מַקְטִיר֥וֹת וּֽמְזַבְּח֖וֹת לֵאלֹהֵיהֶֽן׃

And so did he for all his foreign wives, who offered and sacrificed unto their gods.

From David to Destruction

In addition, Melachim I 11:8 seems to assign the idolatrous activity to Shlomo HaMelech’s wives, and not to Shlomo HaMelech himself. The fact that the Pasuk describes Shlomo as building the altars to foreign gods is also not a problem, explains Ralbag, since even when the Navi describes Shlomo HaMelech building the Beit HaMikdash, he does not mean that Shlomo HaMelech actually builds the Mikdash. Rather, he refers to the fact that the construction occurs under Shlomo HaMelech’s auspices. Regarding the Avodah Zarah as well, Sefer Melachim does not refer to Shlomo HaMelech actually building these forbidden items, but rather that the construction occurs on his watch within his capital city.
Ask a RabbiBookmarkShareCopy