It happened, when all the kings of the Amorites, who were beyond the Jordan westward, and all the kings of the Canaanites, who were by the sea, heard how that Yahweh had dried up the waters of the Jordan from before the children of Israel, until we were passed over, that their heart melted, neither was there spirit in them any more, because of the children of Israel.
And it came to pass, when Joshua was by Jericho, that he lifted up his eyes and he looked, and, behold, there stood a man over against him with his sword drawn in his hand: and Joshua went unto him, and said to him, Are you for us, or for our enemies? And he said, Not for your enemies; but as captain of the host of the Lord am I now come. And Joshua fell on his face to the earth, and worshiped, and said unto him, What saith my lord unto his servant? And the captain of the Lord's host said unto Joshua, Loose thy shoe from off thy foot; for the place where you stand is holy. And Joshua did so ( Joshua 5:13-15 ).