Sayyiduna Abu Dharr (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "O Abu Dharr! What will you do when such hardship befalls that people will not be able to come from their homes to the prayer?" I said: Allah and His Messenger know best. He (peace and blessings be upon him) said: "Exercise restraint." Then he said: "O Abu Dharr! What will you do when deaths become many and a house will be (worth) a slave?" I said: Allah and His Messenger know best. He (peace and blessings be upon him) said: "Be patient." Then he said: "O Abu Dharr! What will you do when killing becomes so widespread that even the stones are drowned in blood?" I said: Allah and His Messenger know best. He (peace and blessings be upon him) said: "Stay where you are." I said: Shall I not even take up my weapons? He (peace and blessings be upon him) said: "Do not join any party; and when you fear being killed, throw your cloth over your face; your sin and his will be upon him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16798