 The war in Ireland formally ended with the Treaty of Limerick.This allowed over 14,000 Irish soldiers under Patrick Sarsfield, to leave for France and allowed most Irish Catholic land owners to keep their land provided they swore allegiance to William of Orange.However, the Protestant dominated Irish Parliament rejected these terms, not ratifying the treaty until 1697 - and then not in full - and imposed a tough Penal Code resented by Irish Catholics for many years.