It was narrated in Kitaab Al-Fitan (the Book of Trials), written by Al-Mirwazi (Al-Bukhari's teacher), that Ali bin Abi Taalib (ra) said:
"If you see the black flags, then hold the ground and do not move your hands or your feet. A people will come forth who are weak and have no capability, their hearts are like blocks of iron. They are the people of the state (literally says "the people of Al-Dawla"), they do not keep a promise or treaty. They call to the truth, but they are not its people. Their first names are كنى Kunaa (nicknames like Abu Muhammed), and their last names are قرى Quraa (names of towns and cities, like Al-Halabi), and their hair is loose like women's hair. (Leave them) until they fight among themselves, then God will bring the truth from from whoever He wills."
"If you see the black flags, then hold the ground and do not move your hands or your feet. A people will come forth who are weak and have no capability, their hearts are like blocks of iron. They are the people of the state (literally says "the people of Al-Dawla"), they do not keep a promise or treaty. They call to the truth, but they are not its people. Their first names are كنى Kunaa (nicknames like Abu Muhammed), and their last names are قرى Quraa (names of towns and cities, like Al-Halabi), and their hair is loose like women's hair. (Leave them) until they fight among themselves, then God will bring the truth from from whoever He wills."