In the time of Nabi Shu’ayb (‘a), his people were involved in polytheism and unfair practices. They lived in the city called Midian from where they organized pirating activities. Also, the merchants defrauded their customers by not giving full measure of weight of the things they purchased.
The leaders of the town were scornful and threatened to drive Nabi Shu’ayb (‘a) out of town unless he stopped preaching.
Nabi Su’ayb (‘a) prayed to Allah Subhanahuwa Ta’ala:
رَبَّنا افْتَحْ بَيْنَنَا وَبَيْنَ الْقَوْمِ بِالْحَقِّ وَأَنْتَ خَيْرُ الْفاتِحينَ
“O Our Rabb! You decide between us and our people in truth, for You are the best to decide.” (7:89).