Solomon finished building the LORD's temple and the royal palace. He had accomplished everything he had planned to do.
The LORD appeared to him a second time. He had already appeared to him at Gibeon.
The LORD said to him, "I have heard you pray to me. I have heard you ask me to show you my favor. You have built this temple. I have set it apart for myself. My Name will be there forever. My eyes and my heart will always be there.
"But you must walk with me, just as your father David did. Your heart must be honest. It must be without blame. Do everything I command you to do. Obey my rules and laws.
Then I will set up your royal throne over Israel forever. I promised your father David I would do that. I said to him, 'You will always have a man on the throne of Israel.'
"But suppose all of you turn away from me. Or your sons turn away from me. You refuse to obey the commands and rules I have given you. And you go off to serve other gods and worship them.
Then I will cut Israel off from the land. It is the land I gave them. I will turn my back on this temple. I will do it even though I have set it apart for my Name to be there. Then Israel will be hated by all of the nations. They will laugh and joke about Israel.
"This temple is now grand and beautiful. But the time is coming when all those who pass by it will be shocked. They will make fun of it. And they will say, 'Why has the LORD done a thing like this to this land and temple?'
"People will answer, 'Because they have deserted the LORD their God. He brought their people out of Egypt. But they have been holding on to other gods. They've been worshiping them. They've been serving them. That's why the LORD has brought all of this horrible trouble on them.' "