It happened, when Joshua was by Jericho, that he lifted up his eyes and looked, and, behold, there stood a man over against him with his sword drawn in his hand: and Joshua went to him, and said to him, Are you for us, or for our adversaries?
There cannot be any doubt about the Divinity of the Prince of the Host of Jehovah who appeared to Joshua in this scene.  The very fact of Joshua's worshipping him, coupled with the acceptance of that worship, proves the Divine nature of this Visitant.  If this Holy One had been any created being, he would have forbidden Joshua to worship him, as did the angel for the apostle John  (Revelation 19:10; 22:9).  There are a number of these remarkable appearances in the O.T.  Dummelow identified the Person here with "The Angel of Jehovah  (Exodus 3:2)," adding that, "The Angel of Jehovah is not a created angel but Jehovah Himself in the act of self-manifestation."[27] "There can be no doubt that this was God Himself seen as human form."[28] "This is none other than the Angel of the Lord, the Lord himself  (Exodus 23:20-21), the pre-incarnate Christ in visible form."[29]  There is a second reason for ascribing divinity to this Prince of the hosts, and that is seen in His command for Joshua to "take thy shoe from off thy foot," indicating that the ground was holy where he stood.  We take the words here to apply to BOTH feet.  "The hosts here are not the hosts of Israel, but the angelic hosts of heaven."[30]