 Saladin invaded the region of Ascalon , but the royal army launched an attack on him in the Battle of Montgisard on 25 November , leading to his defeat . William of Tyre and Ernoul attributed the victory to the king , but Baha ad @-@ Din ibn Shaddad and other Muslim authors recorded that Raynald was the supreme commander . Saladin himself referred to the battle as a " major defeat which God mended with the famous battle of Hattin " , according to Baha ad @-@ Din . 
