It is narrated that: “Certain it is that in the End Times one known as the Hazrat Mahdi (as) will emerge from the furthest part of the country of Magrib (West). And help will go 40 miles before him. HAZRAT MAHDI’S (AS) FLAGS ARE WHITE AND YELLOW. THE GREAT NAME OF ALLAH IS WRITTEN UPON THEM. No unit under his banner will be defeated.
(Imam Sharani, Death, Doomsday, the Hereafter and Portents of Doomsday, (Al-Qurtubi), p. 438)
We are told in the hadith that one of the characteristics that will identify Hazrat Mahdi (as) to people is that he will use “yellow-white flags.” In addition, “there will be lines on these flags and the name of Allah will be written upon them.”
It appears from the description in the hadith that these features refer to the books by which Hazrat Mahdi (as) communicates the moral values of Islam. These books will consist of white pages, with yellow/gold decoration, and there will be a text inside them, and borders of the edges of the pages will contain illustrations and diagrams. And the name of the Book of Almighty Allah will be all over the books, which describe in detail the Greatness and Mightiness of Allah. In addition these books, likened to “flags” in the hadith, will be everywhere that Hazrat Mahdi (as) conquers in figurative, cultural and intellectual terms, everywhere he demolishes atheism, as literally the signs of the flags of an army, of his conquering everywhere they go.
The words in the hadith “no unit under his flag will be defeated” mean that these works of Hazrat Mahdi’s (as) will have an indefatigable impact everywhere they reach and will thus be instrumental in Islamic moral values ruling the world.