Richard Talbot, 1st Earl of Tyrconnell, who was acting as King James II of England's viceroy in Ireland, wanted to ensure that only garrisons were loyal to the Roman Catholic cause were in each of the strong points in the country.
By 1688, the only Protestant garrison left in the country, was that of the walled city of Derry. Alexander MacDonnell, the 3rd Earl of Antrim, was ordered to replace the garrison with a more reliable force. He commanded an army of 1200 men, most of whom were "Redshanks" or men from the Scottish Highlands. The army arrived at the gates of Derry on December 7th, 1688. Legend has the thirteen apprentice boys closing the gates.
The siege did not in fact commence until the 18th of April, 1689. Over the 105 days of the siege, there was great loss and many fights. Eventually, the attackers had the city surrounded on except for the river side, which communications had been cut off, with a large barrier constructed from cables and timber logs, stretching from bank to bank.
In the middle of June, when provisions were extremely low, thirty ships were seen sailing up Lough Foyle, to help those in Derry, but on finding out about the barrier, they halted, and anchored in the lough for forty-six days.
Eventually the fighting stopped, and the besiegers were leaving the occupants of Derry city to starve. On the 30th July, the penultimate day of the siege, the captain of the fleet, that had lain idle for so long, eventually sent three ships, to crash through the barrier and provide Derry with provisions. Richard Hamilton, the lieutenant-general who had led the siege, walked away the next day, July 31st, 1689, and ended the siege. Almost 4000 people died in the siege.