In a speech, Hojat-ol-Islam Seyyed Mohammad Bagher Alavi Tehrani talked about this issue. Below is the summary of his remarks:
Literally, neighbor refers to people whose house is connected to each other or people who live close to each other in a geographical region. The Holy Quran also points to the need to respect neighbors as we read: “Worship God and consider no one equal to Him. Be kind to your parents, relatives, orphans, the destitute, your near and distant neighbors, your companions, wayfarers, and your slaves. God does not love the proud and boastful ones.” (Surah An-Nisa, verse 36)
Accordingly, every Muslim should be aware of the duties that they have with regard to their neighbors.
Respecting neighbors a sign of believers
Leaders of our faiths have said that one of the requirements to be a believer is behaving well with neighbors. This has been manifested in a hadith by Prophet Muhammad (PBUH) who said “If you behave well with neighbors, you are among believers.” Elsewhere, he has said: “Angel Jibril advised me continuously to take care of the neighbor till I thought that Allah is to make him an inheritor.”
This points to the closeness of neighbors to each other. In another hadith, the Prophet (PBUH) is quoted as saying that if one dies while having three neighbors who are happy with him, he will be blessed. This happiness requires that we respect their rights.
The Prophet of Islam also said that whoever annoys their neighbor has annoyed him and whoever annoyed him has annoyed Allah. This is the level of respect that Islam has defined for neighbors.
Rights of neighbors
Talking about the rights of neighbors, Prophet Muhammad (PBUH) named some of the rights: to help them if asked to, to lend them money if asked to, to fulfill their needs, to condole them if they suffer a loss or problem, to congratulate them on happy occasions, to visit them when they are sick, to hold a funeral for them when they pass away, to ask them if you want to build your house at a higher altitude, to present them with a basket of fruits when you buy them for yourself and if you do not want to do so, hide them so that neighbors would not regret your food and fruits, to give them a dish of food when you cook a sweet-smelling food.
Imam Sajjad (AS) also names some of the rights which include: protecting their belongings when they are not at home, respecting them whenever they are present, helping them whenever they are oppressed, not seeking hidden and private affairs of their lives, not abandoning them at hard times, and forgiving their mistakes.
One should hide the imperfections of neighbors in a way that nobody can access them even under torture, Imam Sajjad (AS) said, adding that one should advise his/her neighbor privately if they accept recommendations.