When the Lord your God gives you rest from all the enemies around you in the land he is giving you as your own, you shall destroy any memory of the Amalekites on the earth. Do not forget!
After these things happened, King Xerxes honored Haman son of Hammedatha the Agagite. He gave him a new rank that was higher than all the important men.
Then the Lord said to Moses, “Write about this battle in a book so people will remember. And be sure to tell Joshua, because I will completely destroy the Amalekites from the earth.”
But don’t leave his body hanging on the tree overnight; be sure to bury him that same day, because anyone whose body is displayed on a tree is cursed by God. You must not ruin the land the Lord your God is giving you as your own.
At that time I gave you this command: “The Lord your God has given you this land as your own. Now your fighting men must take their weapons, and you must lead the other Israelites across the river.
Get away so that I may destroy them and make the whole world forget who they are. Then I will make another nation from you that will be bigger and stronger than they are.”
Joshua took control of all the land of Israel as the Lord had told Moses to do long ago. He gave the land to Israel, because he had promised it to them. Then Joshua divided the land among the tribes of Israel, and there was peace in the land.
That is why the Israelites cannot face their enemies. They turn away from the fight and run, because I have commanded that they be destroyed. I will not help you anymore unless you destroy everything as I commanded you.