God’s response to Solomon’s prayers was to confirm a promise:
1 Kings 9:4-5 As for you, if you will follow me with integrity and godliness, as David your father did, obeying all my commands, decrees, and regulations, then I will establish the throne of your dynasty over Israel forever. For I made this promise to your father, David: ‘One of your descendants will always sit on the throne of Israel.’
and give a warning:
1 Kings 9:6-7 But if you or your descendants abandon me and disobey the commands and decrees I have given you, and if you serve and worship other gods, then I will uproot Israel from this land that I have given them. I will reject this Temple that I have made holy to honor my name. I will make Israel an object of mockery and ridicule among the nations.