According to legend, the flag was used in the first Muslim wars; then passed into the hands of the Umayyads and Abbasids; and finally, with Selim I's conquest of Egypt in 1517, fell into Ottoman hands. The Ottomans carried the flag into battle, beginning with their Hungarian campaign circa 1593.