Yahweh's anger was turned away because Rehoboam humbled himself and there was still some good to be found in Judah.