Ali Pasha was Grand Admiral, or Kapudan Pasha, of the Ottoman naval forces at the Battle of Lepanto on 7 October 1571. Selim had entrusted him with one of the most precious possessions of the Ottoman Sultans, the great "Banner of the Caliphs", a huge green banner heavily embroidered with texts from the Qur'an and with the name of Allah emblazoned upon it 28,900 times in golden letters. It was intended to provide an incentive for him and his men to do their best in battle.