In 1601, a Spanish military expedition – the last of the Armadas launched against the Kingdom of England – landed in Kinsale in order to link with Irish rebel forces and attack England through Ireland. As a result, the battle of Kinsale took place at the end of the Nine Years War in which English forces, led by Charles Blount, 8th Baron Mountjoy, defeated the rebel Irish force, led by Hugh O'Neill, 2nd Earl of Tyrone and Red Hugh O'Donnell, two Gaelic princes from Ulster. The Irish forces were allied with the forces of King Felipe III of Spain, who was also King of Portugal and the Algarves. In September 1607, a few years after this battle, the Flight of the Earls took place from Rathmullan in County Donegal in West Ulster in which a number of the native Irish aristocrats, including both Hugh O'Neill, 2nd Earl of Tyrone and Rory O'Donnell, 1st Earl of Tyrconnell, abandoned their lands and fled to Continental Europe. Shortly after the battle, James's Fort was built to protect the harbour.