Language:
كتاب النكاح
67  
Wedlock, Marriage (Nikaah)
(37)
Chapter: Whoever said, "A marriage is not valid except through the Wali."
(36)
بَابُ مَنْ قَالَ لاَ نِكَاحَ إِلاَّ بِوَلِيٍّ
Sahih al-Bukhari 5127
Narrated 'Urwa bin Az-Zubair:

'Aishah, the wife of the Prophet (ﷺ) told him that there were four types of marriage during Pre-Islamic period of Ignorance. One type was similar to that of the present day i.e. a man used to ask somebody else for the hand of a girl under his guardianship or for his daughter's hand, and give her Mahr and then marry her. The second type was that a man would say to his wife after she had become clean from her period. "Send for so-and-so and have sexual intercourse with him." Her husband would then keep away from her and would never sleep with her till she got pregnant from the other man with whom she was sleeping. When her pregnancy became evident, he husband would sleep with her if he wished. Her husband did so (i.e. let his wife sleep with some other man) so that he might have a child of noble breed. Such marriage was called as Al-Istibda'. Another type of marriage was that a group of less than ten men would assemble and enter upon a woman, and all of them would have sexual relation with her. If she became pregnant and delivered a child and some days had passed after delivery, she would sent for all of them and none of them would refuse to come, and when they all gathered before her, she would say to them, "You (all) know waht you have done, and now I have given birth to a child. So, it is your child so-and-so!" naming whoever she liked, and her child would follow him and he could not refuse to take him. The fourth type of marriage was that many people would enter upon a lady and she would never refuse anyone who came to her. Those were the prostitutes who used to fix flags at their doors as sign, and he who would wished, could have sexual intercourse with them. If anyone of them got pregnant and delivered a child, then all those men would be gathered for her and they would call the Qa'if (persons skilled in recognizing the likeness of a child to his father) to them and would let the child follow the man (whom they recognized as his father) and she would let him adhere to him and be called his son. The man would not refuse all that. But when Muhammad (ﷺ) was sent with the Truth, he abolished all the types of marriages observed in pre-Islamic period of Ignorance except the type of marriage the people recognize today.

قَالَ يَحْيَى بْنُ سُلَيْمَانَ حَدَّثَنَا ابْنُ وَهْبٍ، عَنْ يُونُسَ،‏.‏ حَدَّثَنَا أَحْمَدُ بْنُ صَالِحٍ، حَدَّثَنَا عَنْبَسَةُ، حَدَّثَنَا يُونُسُ، عَنِ ابْنِ شِهَابٍ، قَالَ أَخْبَرَنِي عُرْوَةُ بْنُ الزُّبَيْرِ، أَنَّ عَائِشَةَ، زَوْجَ النَّبِيِّ صلى الله عليه وسلم أَخْبَرَتْهُ أَنَّ النِّكَاحَ فِي الْجَاهِلِيَّةِ كَانَ عَلَى أَرْبَعَةِ أَنْحَاءٍ فَنِكَاحٌ مِنْهَا نِكَاحُ النَّاسِ الْيَوْمَ، يَخْطُبُ الرَّجُلُ إِلَى الرَّجُلِ وَلِيَّتَهُ أَوِ ابْنَتَهُ، فَيُصْدِقُهَا ثُمَّ يَنْكِحُهَا، وَنِكَاحٌ آخَرُ كَانَ الرَّجُلُ يَقُولُ لاِمْرَأَتِهِ إِذَا طَهُرَتْ مِنْ طَمْثِهَا أَرْسِلِي إِلَى فُلاَنٍ فَاسْتَبْضِعِي مِنْهُ‏.‏ وَيَعْتَزِلُهَا زَوْجُهَا، وَلاَ يَمَسُّهَا أَبَدًا، حَتَّى يَتَبَيَّنَ حَمْلُهَا مِنْ ذَلِكَ الرَّجُلِ الَّذِي تَسْتَبْضِعُ مِنْهُ، فَإِذَا تَبَيَّنَ حَمْلُهَا أَصَابَهَا زَوْجُهَا إِذَا أَحَبَّ، وَإِنَّمَا يَفْعَلُ ذَلِكَ رَغْبَةً فِي نَجَابَةِ الْوَلَدِ، فَكَانَ هَذَا النِّكَاحُ نِكَاحَ الاِسْتِبْضَاعِ، وَنِكَاحٌ آخَرُ يَجْتَمِعُ الرَّهْطُ مَا دُونَ الْعَشَرَةِ فَيَدْخُلُونَ عَلَى الْمَرْأَةِ كُلُّهُمْ يُصِيبُهَا‏.‏ فَإِذَا حَمَلَتْ وَوَضَعَتْ، وَمَرَّ عَلَيْهَا لَيَالِيَ بَعْدَ أَنْ تَضَعَ حَمْلَهَا، أَرْسَلَتْ إِلَيْهِمْ فَلَمْ يَسْتَطِعْ رَجُلٌ مِنْهُمْ أَنْ يَمْتَنِعَ حَتَّى يَجْتَمِعُوا عِنْدَهَا تَقُولُ لَهُمْ قَدْ عَرَفْتُمُ الَّذِي كَانَ مِنْ أَمْرِكُمْ، وَقَدْ وَلَدْتُ فَهُوَ ابْنُكَ يَا فُلاَنُ‏.‏ تُسَمِّي مَنْ أَحَبَّتْ بِاسْمِهِ، فَيَلْحَقُ بِهِ وَلَدُهَا، لاَ يَسْتَطِيعُ أَنْ يَمْتَنِعَ بِهِ الرَّجُلُ‏.‏ وَنِكَاحُ الرَّابِعِ يَجْتَمِعُ النَّاسُ الْكَثِيرُ فَيَدْخُلُونَ عَلَى الْمَرْأَةِ لاَ تَمْتَنِعُ مِمَّنْ جَاءَهَا وَهُنَّ الْبَغَايَا كُنَّ يَنْصِبْنَ عَلَى أَبْوَابِهِنَّ رَايَاتٍ تَكُونُ عَلَمًا فَمَنْ أَرَادَهُنَّ دَخَلَ عَلَيْهِنَّ، فَإِذَا حَمَلَتْ إِحْدَاهُنَّ وَوَضَعَتْ حَمْلَهَا جُمِعُوا لَهَا وَدَعَوْا لَهُمُ الْقَافَةَ ثُمَّ أَلْحَقُوا وَلَدَهَا بِالَّذِي يَرَوْنَ فَالْتَاطَ بِهِ، وَدُعِيَ ابْنَهُ لاَ يَمْتَنِعُ مِنْ ذَلِكَ، فَلَمَّا بُعِثَ مُحَمَّدٌ صلى الله عليه وسلم بِالْحَقِّ هَدَمَ نِكَاحَ الْجَاهِلِيَّةِ كُلَّهُ، إِلاَّ نِكَاحَ النَّاسِ الْيَوْمَ‏.‏
Reference : Sahih al-Bukhari 5127
In-book reference : Book 67, Hadith 63
USC-MSA web (English) reference : Vol. 1, Book 62, Hadith 58
  (deprecated numbering scheme)