ʿ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.' " (Using translation from Bukhārī 4549)
قَالَ رَسُولُ اللهِ ﷺ مَنْ حَلَفَ عَلَى يَمِينٍ صَبْرٍ يَقْتَطِعُ بِهَا مَالَ امْرِئٍ مُسْلِمٍ لَقِيَ اللهَ وَهُوَ عَلَيْهِ غَضْبَانُ فَأَنْزَلَ اللهُ تَبَارَكَ وَتَعَالَى تَصْدِيقَ ذَلِكَ {إِنَّ الَّذِينَ يَشْتَرُونَ بِعَهْدِ اللهِ وَأَيْمَانِهِمْ ثَمَنًا قَلِيلًا} [آل عمران 77] إِلَى آخِرِ الْآيَةِ فَدَخَلَ الْأَشْعَثُ بْنُ قَيْسٍ فَقَالَ مَا حَدَّثَكُمْ أَبُو عَبْدِ الرَّحْمَنِ؟ قَالُوا كَذَا وَكَذَا قَالَ فِيَّ أُنْزِلَتْ هَذِهِ الْآيَةُ كَانَتْ لِي بِئْرٌ فِي أَرْضِ ابْنِ عَمٍّ لِي فَأَتَيْتُ رَسُولَ اللهِ ﷺ فَقَالَ بَيِّنَتَكَ أَوْ يَمِينَهُ قُلْتُ إِذًا يَحْلِفُ عَلَيْهَا يَا رَسُولَ اللهِ فَقَالَ رَسُولُ اللهِ ﷺ مَنْ حَلَفَ عَلَى يَمِينٍ صَبْرٍ هُوَ فِيهَا فَاجِرٌ يَقْتَطِعُ بِهَا مَالَ امْرِئٍ مُسْلِمٍ لَقِيَ اللهَ وَهُوَ عَلَيْهِ غَضْبَانُ