Given the fact that Joshua and the tribes of Israel were encamped not far from Jericho, the king and his soldiers were probably on the lookout for any strange men. They would have been on the alert. Any news of new arrivals
in the city would have quickly been told to the king and his guards.
2 And it was told to the king of Jericho, “Behold, men of Israel have come here tonight to search out the land.”