The English authorities in Dublin Castle had been slow to comprehend the scale of the rebellion. After failed negotiations in 1595, English armies tried to break into Ulster but were repulsed by a trained army including musketeers in prepared positions; after a stinging defeat at the Battle of Clontibret, successive English offensives were driven back in the following years. At the Battle of the Yellow Ford in 1598 up to 2,000 English troops were killed after being attacked on the march to Armagh. The rest were surrounded in Armagh itself but negotiated safe passage for themselves in return for evacuating the town. O'Neill's personal enemy, Sir Henry Bagenal, had been in command of the army and was killed during the early engagements. It was the heaviest defeat ever suffered by the English army in Ireland up to that point.