It has been confirmed in many narrations that there are two flags in Islam; the first is called Al-Liwaa and serves as the sign for the leader of the Muslim army. It is also the flag of the Islamic State. The other is termed Ar-Raya and is used by the Muslim army.
The Liwaa of the Messenger was a piece of white cloth with the words "La Illaha Illa Allah Muhammadur Rasul Allah" written across it (i.e. There is no god but Allah, and Muhammad is his messenger). The Raya of the Messenger was a piece of black wool with the words "La Illaha Illa Allah Muhammadur Rasul Allah" also written across it. Therefore, the Liwaa is a white flag with black inscription, and the Raya is a black flag with white inscription.
Ibn Abbas (ra) narrated that the Raya of the Messenger was black and that his Liwaa was white.
While the Muslims were fighting the battle of Mu'atah against the Romans, the Messenger delivered a Khutbah in Medinah and informed the Muslims there of what had transpired in the battlefield. The Messenger informed them that Zayd (ra) had been martyred and that Ja'far (ra) took the Raya (black flag) after him, but that Ja'far (ra) was also martyred so Abdullah Ibn Ruwahah (ra) took the Raya (black flag) from him.
Al-Barra'a Ibnu Azeb (ra) was asked about the Messenger's Raya. He said: "It was black, had four corners and was made of wool."
These and other ahadith clearly prove that Muhammad had designated a flag for his Ummah.
The Messenger of Allah conquered and entered Mecca with a Liwaa (white flag).