ʿAbdullah bin Masud said, "Messenger of Allah ﷺ said, 'Whoever takes an oath when asked to do so, in which he may deprive a Muslim of his property unlawfully, will meet Allah Who will be angry with him.' So Allah revealed in confirmation of this statement:--"Verily! Those who Purchase a small gain at the cost of Allah's Covenant and oaths, they shall have no portion in the Hereafter..." (3.77) Then entered Al-Ash'ath bin Qais and said, "What is Abu ʿAbdur-Rahman narrating to you?" We replied, 'So-and-so." Al-Ash'ath said, "This Verse was revealed in my connection. I had a well in the land of my cousin (and he denied my, possessing it). On that the Prophet ﷺ said to me, 'Either you bring forward a proof or he (i.e. your cousin) takes an oath (to confirm his claim)' I said, 'I am sure he would take a (false) oath, O Messenger of Allah ﷺ.' He said, 'If somebody takes an oath when asked to do so through which he may deprive a Muslim of his property (unlawfully) and he is a liar in his oath, he will meet Allah Who will be angry with him.' "
قَالَ رَسُولُ اللَّهِ ﷺ مَنْ حَلَفَ يَمِينَ صَبْرٍ لِيَقْتَطِعَ بِهَا مَالَ امْرِئٍ مُسْلِمٍ لَقِيَ اللَّهَ وَهْوَ عَلَيْهِ غَضْبَانُ فَأَنْزَلَ اللَّهُ تَصْدِيقَ ذَلِكَ {إِنَّ الَّذِينَ يَشْتَرُونَ بِعَهْدِ اللَّهِ وَأَيْمَانِهِمْ ثَمَنًا قَلِيلاً أُولَئِكَ لاَ خَلاَقَ لَهُمْ فِي الآخِرَةِ} إِلَى آخِرِ الآيَةِ قَالَ فَدَخَلَ الأَشْعَثُ بْنُ قَيْسٍ وَقَالَ مَا يُحَدِّثُكُمْ أَبُو عَبْدِ الرَّحْمَنِ قُلْنَا كَذَا وَكَذَا قَالَ فِيَّ أُنْزِلَتْ كَانَتْ لِي بِئْرٌ فِي أَرْضِ ابْنِ عَمٍّ لِي قَالَ النَّبِيُّ ﷺ بَيِّنَتُكَ أَوْ يَمِينُهُ فَقُلْتُ إِذًا يَحْلِفَ يَا رَسُولَ اللَّهِ فَقَالَ النَّبِيُّ ﷺ مَنْ حَلَفَ عَلَى يَمِينِ صَبْرٍ يَقْتَطِعُ بِهَا مَالَ امْرِئٍ مُسْلِمٍ وَهْوَ فِيهَا فَاجِرٌ لَقِيَ اللَّهَ وَهْوَ عَلَيْهِ غَضْبَانٌ