It is narrated from Umm al-Mu’minin Sayyida Aisha (may Allah be pleased with her) that the Noble Prophet (peace and blessings be upon him) said: “Any woman who marries without the permission of her guardian, her marriage is invalid, her marriage is invalid, her marriage is invalid. Then if the guardians dispute (one says marry so-and-so, another says marry so-and-so), then the ruler is the guardian of the one who has no guardian. So if a man has intercourse with such a woman (without the permission of her guardian), then she is entitled to a dowry (i.e., he must give her the dowry), in exchange for the man having made her private parts lawful to himself.” Abu Asim said: I was dictated this hadith in the year 146 Hijri.
Brief Explanation
(Explanation of Hadiths 2218 to 2221)
From all these hadiths, it is understood that a marriage (nikah) does not take place without the permission of a guardian (wali). This hadith has been narrated by nearly thirty Companions, some of its chains being authentic and some weak. The majority of scholars also hold the opinion that a marriage does not take place without a guardian (wali) and two witnesses. Civil marriages and the like are all included in this (i.e., such a marriage is not valid), and by wali is meant the father; in the absence of the father, then the grandfather, then the brother, then the paternal uncle, or from among the agnates (asaba), whoever is closest by lineage. After that, then the relatives by cause (sababi), then their agnate relatives; those with uterine ties (dhawi al-arham) cannot become guardians (awliya).
If someone has two guardians (awliya) and there is a disagreement at the time of marriage, preference will be given to the closer guardian. If no guardian is present at all, it is clearly stated in the hadith that the head of state is her guardian. And if both guardians are of equal status and there is a disagreement between them, then in such a case, the ruler of the time will be the guardian.
Similarly, when there is severe disagreement among the guardians that becomes an obstacle to the marriage, then in such a case, the status of these guardians becomes negligible and their right of guardianship (wilayah) falls away, and this entitlement transfers to the ruler of the time.
As it is mentioned in the hadith: «فَإِنْ تَشَاجَرُوْا فَالسُّلْطَانُ وَلِيُّ مَنْ لَا وَلِيَّ لَهُ.» And the Hanafis do not consider the condition of a guardian (wali) necessary; they make an analogy between marriage (nikah) and sale (bay‘), and weaken or interpret this hadith, which is not correct. It is not permissible to make analogy (qiyas) in opposition to an explicit text (nas sariḥ). Furthermore, from the investigation of the hadith, it is evident that rejecting this hadith by declaring it weak is not correct. According to Imam Abu Hanifah rahimahullah, those with uterine ties (dhawi al-arham) such as maternal grandfather, maternal uncle, etc., can also be guardians (awliya); this too is not correct.
It is stated in Hujjatullah al-Baligha that the condition of a guardian (wali) in marriage (nikah) has been stipulated because if a woman were to contract her own marriage, there would be a kind of immodesty in it.
Secondly, that publicity is required in marriage, and this will only occur when the woman's guardians (awliya) are present.
Thirdly, that a woman is deficient in intellect, so there is a possibility that she may marry a bad man or someone not suitable (ghayr kafu’), which may later become a cause of difficulties.
And Allah knows best.