As a general rule, Muslims should not harm other people, especially other Muslims. The only exception to this rule is due to the need for self-defense against aggression or to avert some greater evil, as stated in the following subsidiary legal maxim:
In contrast, protecting people from harm is a virtuous deed in Islam, such that it can be a means of great reward in the Hereafter. Even a simple act such as removing thorns from the road is a good deed that leads to Paradise.
Abu Barza reported: I said, “O Messenger of Allah, teach me something that will benefit me.” The Messenger of Allah, peace and blessings be upon him, said:
اعْزِلْ الْأَذَى عَنْ طَرِيقِ الْمُسْلِمِينَ
Remove harmful things from the roads of the Muslims.