Judges 18:5

And they said unto him, Ask counsel, we pray thee, of God, that we may know whether our way which we go shall be prosperous.

The verse stands in the story of the Danites looking for an inheritance to possess, when five men were sent to explore the land, discovered Laish, and brought back their report to their tribe, after which the Danites seized Micah's idols and his Levite, destroyed Laish, and set up idolatrous worship in the city they renamed Dan. On their way the scouts stopped at Micah's house and asked the Levite there to inquire of God whether the journey they were undertaking would prosper, and he answered them with a blessing of success. He did so although he was acting as an irregular priest in a private household shrine furnished with carved images, an ephod, and teraphim employed for delivering oracles.

The chapter to which the request belongs is part of the record of Israel's backsliding and of the disgrace and punishment that followed it. It belongs to the time when everyone did what was right in his own eyes, and its events together with those of chapter 19 expose the gross immorality then prevailing. The chapter records the first apostasy of the tribe of Dan, which is offered as a possible reason why Dan is omitted from the tribes listed among the 144,000 in Revelation 7.

That history shows that human judgment left without divine revelation can be warped by selfishness until wrong looks right, so that right must be tested by God's law rather than by human opinion.