The Ottoman garrison held on until the dismounted attackers were within 20 yards , but by that time, there was no doubt that the Ottoman garrison was losing the fight, and they began to surrender in small groups.