God answers prayer

Thirteenth in the Solomon Series

Before he died, David amassed the precious metals and stones, the iron and bronze and much of the wood that would be needed for building the temple, and he led the people in giving freewill offerings for the house of the Lord. He prayed: Grant to Solomon my son that with a whole heart he may keep thy commandments, thy testimonies, and thy statutes, performing all, and that he may build the palace for which I have made provision." (see full prayer - 1Ch 29:10-19)

We know that David's prayer was answered; that Solomon built God's house, and kept and performed the Lord's statutes, at first. However, "when he was old," (1 Ki 11:4) Solomon's wives...

turned away his heart after other gods: and his heart was not perfect with the LORD his God, as [was] the heart of David his father.
For Solomon went after Ashtoreth the goddess of the Zidonians, and after Milcom the abomination of the Ammonites.
And Solomon did evil in the sight of the LORD, and went not fully after the LORD, as [did] David his father.
Then did Solomon build an high place for Chemosh, the abomination of Moab, in the hill that [is] before Jerusalem, and for Molech, the abomination of the children of Ammon.
And likewise did he for all his strange wives, which burnt incense and sacrificed unto their gods.
(1Ki 11:4-8)

Although Solomon continued to worship in the temple, his loyalties were divided. Some commentators say he did not worship with his wives, but accommodated their worship practices; others say he joined his wives in idolatrous worship.

His actions and divided heart brought God's judgment:

"Since this has been your mind and you have not kept my covenant and my statutes which I have commanded you, I will surely tear the kingdom from you and will give it to your servant.
Yet for the sake of David your father I will not do it in your days, but I will tear it out of the hand of your son.
However I will not tear away all the kingdom; but I will give one tribe to your son, for the sake of David my servant and for the sake of Jerusalem which I have chosen."
And the LORD raised up an adversary against Solomon…
1 Ki 11:11-14a

Thankfully, as noted at the start, Solomon's father had prayed for him. At first, it seems the prayer was forgotten after a time, as we consider the shameful backsliding (perhaps not a strong enough term), and that a divided heart resulted in a divided kingdom.

Yet, Solomon did turn back to God's Word. We see this turning in Ec 7:29, Lo, this only have I found, that God hath made man upright; but they have sought out many inventions.

Solomon's acknowledgement that God made man upright shows us that he believed Genesis, that man was created in the image and likeness of God, but later fell and thereafter pursued all sorts of devious paths to pleasure and enlightenment leading to gloom.

The context of Ec 7:29 shows that Solomon realized that his downfall had been brought about by his invention of marriages, as though that was allowable for a king. Yes, some sultans and kings of nations in that region had similar harems, but Israel was meant to model righteousness, not to imitate the opposite.

I applied mine heart to know, and to search, and to seek out wisdom, and the reason [of things], and to know the wickedness of folly, even of foolishness [and] madness:
And I find more bitter than death the woman, whose heart [is] snares and nets, [and] her hands [as] bands: whoso pleaseth God shall escape from her; but the sinner shall be taken by her.
Behold, this have I found, saith the preacher, [counting] one by one, to find out the account:
Which yet my soul seeketh, but I find not: one man among a thousand have I found; but a woman among all those have I not found.
Lo, this only have I found, that God hath made man upright; but they have sought out many inventions.
(Ec 7:25-29)

Solomon understood he had been foolish; snared by loose women because he was sinful, but he could not exactly understand why he had not been enabled or able to avoid the fetters of willful abandon. After all, was he not the wisest man in the world? Nevertheless, he would acknowledge that one man in a thousand was worthy of his admiration — that not all men were sinful as he understood he was; but no woman could claim his praise.

Perhaps his disappointment in himself and extreme focus on his own sins prevented him from seeing any good in women, generally.

In discouragement, all seems lost. Pray!