عَنْ عُقْبَةَ بْنِ عَامِرٍ رَضِيَ اللَّهُ عَنْهُ أَنَّ نَبِيَّ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ إِذَا أَنْكَحَ الْوَلِيَّانِ فَهُوَ لِلْأَوَّلِ مِنْهُمَا وَإِذَا بَاعَ الرَّجُلُ بَيْعًا مِنْ رَجُلَيْنِ فَهُوَ لِلْأَوَّلِ مِنْهُمَا
Narrated by Sayyiduna Uqbah bin Amir (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: When two guardians marry a woman (to someone), the marriage of the one who did it first will be valid, and when a man sells something to two men, it will belong to the first buyer.