When Joshua was near Jericho, he looked up and saw a man standing in front of him with a drawn sword in His hand. Joshua approached Him and asked, "Are You for us or for our enemies?"
References for Joshua 5:13
"Neither," He replied. "I have now come as commander of the Lord's army." Then Joshua bowed with his face to the ground in worship and asked Him, "What does my Lord want to say to His servant?"
The commander of the Lord's army said to Joshua, "Remove the sandals from your feet, for the place where you are standing is holy." And Joshua did so.