Joshua has taken the mantle of leadership from Moses, and now is the named leader of Israel. He has lead the people across the Jordan River in a fashion recalling Moses and the Red Sea. The people are camped and ready to take on the city of Jericho. The people and army of Israel are waiting for the right time to attack. They had to wait because all the men had just been circumcised, and I am sure they were not feeling spry enough to jump up and fight a battle. While waiting Joshua is studying the city and the commander of the Lord's army appears to Joshua.
It is interesting that Joshua does not realize this at first. Throughout scriptures whenever an angel of the Lord appears the people know it is an angel of the Lord. Not this time. So Joshua asks a really good question to ask when there is a sword wielding warrior in front of you, "Are you friend or foe?" Remember Joshua is now in enemy territory. He is in the land of the people who he is about to wipe off the face of the earth. I might automatically consider someone I didn't know, who was carrying a sword, looking ready for battle to be an enemy.
When we face great challenges it is easy to lose sight of possibilities. There is a diminished ability to see the ways in which God could be providing assistance. Joshua is never told to expect a meeting with the commander of the Lord's army. All he knows is that God is going to give the land to him, not how. I am sure that Joshua had a battle plan in mind already, and the army of the Lord was not part of it. I guess I might have assumed the person I saw with sword in hand to be an enemy and engage them in battle. Not Joshua he asks a real important question, friend or foe. I wonder how many friends, and how much of God's assistance I have missed because I have failed to ask the right question?