Sayyiduna Muhammad bin Maslamah Ansari (may Allah be pleased with him) reports that the Prophet (peace and blessings be upon him) said: "O Muhammad! When you see people fighting over the world, then take your sword and strike it on a strong stone of the Haram so that it breaks, then sit in your house until either the hand of a wrongdoer reaches you, or decisive death comes to you." So I did exactly what the Messenger of Allah (peace and blessings be upon him) had commanded me.
Related hadith on this topic
Explanation & Benefits
Maulana Ataullah Sajid
Benefits and Issues:
(1)
The weapons of Muslims should be used against the disbelievers; when they are turned against a Muslim, it is better for them to be destroyed.
(2)
The meaning of a sinful hand is that you become the target of some evildoer and attain martyrdom as an oppressed person, or due to natural death you are freed from these troubles.
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 3962