In the past, at-tabanni or child adoption was a common practice. Even the Prophet sallallaahu ‘alaihi Wasallam had adopted Zaid bin Harithah.
However, this tabanni or adoption is abolished by the revelation of the verse:
ادْعُوهُمْ لِآبَائِهِمْ هُوَ أَقْسَطُ عِندَ اللَّهِ فَإِن لَّمْ تَعْلَمُوا آبَاءهُمْ فَإِخْوَانُكُمْ فِي الدِّينِ وَمَوَالِيكُمْ
“Call them by [the names of] their fathers; it is more just in the sight of Allah. But if you do not know their fathers – then they are [still] your brothers in religion and those entrusted to you” (al-Ahzab : 5).
Noble Shaikh Abdul Aziz ibn Baz explains:
“In the past, tabanni (adoption) was a common thing in the Jahiliyah era. Zaid bin Harithah used to call himself Zaid bin Muhammad. When Allah revealed the above verse, he again attributed himself to his father, becoming Zaid bin Harithah. And since then the Shari’a has stipulated that it is obligatory for every child to attribute themselves to their fathers and not to do tabanni for anyone.” (Fatawa Nurun ‘alad Darbi, https://binbaz.org.sa/fatwas/43515).
Also in the hadith from Abu Zar al-Gifari radiallahu’anhu, the Prophet sallallahu’alaihi wasallam says:
ليسَ مِن رَجُلٍ ادَّعَى لِغَيْرِ أبِيهِ – وهو يَعْلَمُهُ – إلَّا كَفَرَ
“Whoever considers himself to be the son of someone who is not his biological father, even though he knows that person is not his biological father, then he is a kufr.” (Bukhari: 3508, Muslim: 61).
In the hadith from Anas ibn Malik radiallahu’anhu, the Prophet sallallahu’alaihi wasallam says:
مَن ادَّعى إلى غيرِ أبيه ، أو انتمى إلى غيرِ مَواليه ، فعليه لعنةُ اللهِ المتَتَابِعَةُ إلى يومِ القيامةِ
“Whoever attributes himself as the son of someone who is not his biological father, or attributes himself to other than his family, then for him the curse of Allah will continue until the Day of Resurrection.” (Abu Daud: 5115, validated by al-Albani).
The verses and hadiths above show that it is forbidden to attribute oneself to a father who is not his biological father or to attribute one’s lineage to another. And this act is a major sin.
This also shows that the adoption of a child is prohibited, if the child is considered as his own child and assigned to his foster parents.
However, if the adoption of a child is in the form of nurturing, educating and providing for a child until he grows up, but is not considered a child and is not assigned to his foster parents, it is permissible.
Noble Shaikh Ibn Baz explains again:
أما التربية فلا بأس إذا ربوا ولد غيرهم وأحسنوا إليه على أنه ينسب لأبيه لا إليه فلا بأس بذلك، أما أن يقال: ولد فلان، وليس ولد فلان فلا يجوز مطلقاً
“But educating (a child to grow up), this is not forbidden. If there is a husband and wife who take care of other people’s children, and do good to the child (until it grows up), and the child is still assigned to his biological parents, then this is okay. But if it is said: “This is the child of the foster father, not the child of the Fulan (biological parent), this is not allowed at all.” (Fatawa Nurun ‘alad Darbi, https://binbaz.org.sa/fatwas/43515).
However, an adopted child, whether it is an unlawful or permissible adoption, remains an ajnabi (other person). If he is a boy, then he is not a mahram for his foster mother, cannot see his aurah, or touch her, or be alone with her.
Also if she is a daughter, then she is not a mahram for her foster father, the father cannot see the aurah of his adopted child, or touch her, or be alone with her, and also cannot be his wali in marriage.
The solution of this problematic things is:
1. They should take care of children from among their own relatives who are still a mahram. If it is a daughter, then it can be from the husband’s nephew who is the mahram for the husband. If it’s a boy, then it can be from the wife’s niece who is the mahram for the wife.
2. They are supposed to care for a child who has been breastfed. Because a child who has been breastfed is a mahram.