for the sake of David: Even though Solomon broke God's agreement, God kept his promises to David (see also Psalm 89:28–37).