The highpoint of Northern Ireland's loyalist marching season, which often leads to sectarian clashes, is a celebration of the Protestant victory at the Battle of the Boyne.
King James II, a Catholic, ruled England until 1688 when a Protestant conspiracy convinced the Dutch Prince William of Orange, later William III, to invade and claim the crown.
The scene moved to Ireland where the centuries-old European trial of strength between protestantism and catholicism was about to witness one of its final battles.
In Derry, 13 Apprentice Boys closed the gates of the city in the face of oncoming Catholic soldiers. When James landed in Ireland with French troops, he marched on Derry but was repulsed by the Protestant garrison who declared their defiance with cries of "No surrender!" He laid siege to the city but failed to take it.
As the Protestant William took the iniative, he confronted James on 1 July 1690 at the Battle of the Boyne. William defeated James and the Catholic king fled to France. Protestant dominance of both Britain and Ireland was for the taking.
The supremacy of the Protestants in Ulster was further entrenched by further victories at the Battle of Aughrim in 1691. The Treaty of Limerick that year allowed 15,000 Irish soldiers to leave to serve France's Louis XIV. It also promised Catholic toleration.