In fact, Islam encourages every good action and urges Muslims to show mercy to all the creatures of Allah, including birds and beasts. A Muslim should show kindness and care to the birds he keeps in his house as well as everything around him. He should take the example of the Prophet (peace and blessings be upon him) who was sent as a ‘mercy for all creatures”.
Examining this issue, the prominent Muslim scholar Sheikh `Abdul-Bari Az-Zamzami, member of the Moroccan scholar’s Association, states that: “Caging birds and offering food to them and treating them kindly is not only permissible, but also recommended. A Muslim will receive a reward from Allah for that as long as he has made the intention that he is doing this for the sake of Allah. In the hadith of the Prophet, we read: “In every living liver (i.e. living being), there is a reward.” In another hadith, the Prophet (peace and blessings be upon him) is reported to have said: “And if you show mercy to a sheep, Allah will shower mercy on you.” Keeping birds and offering food to them may preserve their lives, since they are safe from predatory animals. It is also recorded that there was a boy at the time of the Prophet called Abu `Umair and he u
sed to keep a small bird with him all the time. Whenever he saw his family in the house, the Prophet (peace and blessings be upon him) used to call this boy, smile at him and say: “What has happened to An-Nughair (the name of the bird)?” Some scholars used this hadith and deduced about 400 benefits from it. This behavior of the Prophet (peace and blessings be upon him) indicates that it is permissible to keep birds at home and offer them food.”