First of all, we’d like to make it clear that Islam does not sanction any discrimination between children based on gender differences; this is totally un-Islamic. So, there is no difference at all, as far as Islamic Shari`ah is concerned between baby boy or baby girls with regard to breastfeeding. As for the proper period of breastfeeding, it is two years. However, there is nothing wrong for a mother to breastfeed her baby past the two years, especially if she deems it conducive to the wellbeing of your child.

Elaborating on this, we’d like to furnish you with the following issued by Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, who states: “A mother in Islam is expected to provide nurturing care and love for her children. Breastfeeding is undoubtedly one of the best ways of providing such care. Breast milk has been specifically created by Allah to provide all the necessary nutrients and immunity so vital for the development of the child in its formative years, and as such there is no substitute for it. So, you are to be commended for your zeal to provide the loving care for your child.
It is, therefore, not at all surprising when Allah states in the Qur’an, “Mothers shall give such to their children for two whole years, for those who wish the suckling to be completed…if after consultation, they choose by mutual agreement to wean the child, it is no offence for them…” (Al-Baqarah: 233).
Scholars have deduced a number of points from the above verse: the full term of breastfeeding is two years—if the parents so decide; however, should they prefer to wean earlier, it can be done without incurring any offence or sin so long as such a decision has been made after giving due consideration to the welfare of the child as well as the interests of both parents.
As for whether a mother can breastfeed past the two years, the answer is: there is nothing in the sources to indicate that it is wrong to do so. So, mothers are free to do so if you deem it conducive to the wellbeing of your child.
Having said this, however, I should convince you that at some point you must make a distinction between providing, responsible nurturing care and spoiling a child. Sometimes a child may never wish to wean at all if you were to leave it entirely to his choice. It is therefore important for you to plan to wean him/her gradually without causing him/her undue emotional stress. You should decide your move in consultation with your paediatrician and a trained nurse.”