When the forty years had passed, Moses led the Israelites east around the Dead Sea to the territories of Edom and Moab. There they escaped the temptation of idolatry, conquered the lands of Og and Sihon in Transjordan, received God's blessing through Balaam the prophet, and massacred the Midianites, who by the end of the Exodus journey had become the enemies of the Israelites due to their notorious role in enticing the Israelites to sin against God. Moses was twice given notice that he would die before entry to the Promised Land: in Numbers 27:13, once he had seen the Promised Land from a viewpoint on Mount Abarim, and again in Numbers 31:1 once battle with the Midianites had been won.