After seizing the crown during the Glorious Revolution of 1688, King William III set about defeating the forces of his exiled rival, James II, in Scotland and Ireland. James's supporters were commonly known as Jacobites, a title derived from the Latin version of his name.
The fighting that broke out in these countries can be viewed as part of the Nine Years War (1689-97). This was a wider European conflict in which the Holy Roman Empire, the Dutch Republic, England, Spain, Savoy, Sweden and a number of German states allied themselves against France and the expansionist ambitions of its ruler, King Louis XIV.
Following his flight to France, James II commissioned John Graham of Claverhouse, Viscount Dundee, as commander of his forces in Scotland. In the spring of 1689, Dundee raised an army of Highlanders to take on the soldiers of the new Williamite government.
On 27 July, after several months of indecisive manoeuvring, he attacked and routed the government forces of General Hugh Mackay in the pass of Killiekrankie. Dundee, however, was killed in the attack. And although the Jacobite army received reinforcements at Blair, its effectiveness was severely reduced as a result of his death.
The Jacobites continued south, attacking Dunkeld on 18 August 1689. The town was held by a single regiment, recently raised from a fanatical sect of Covenanters, known as Cameronians. After a four-hour struggle, the Jacobites were driven back and the clans dispersed.
Following an abortive rising in 1690, Mackay marched through the Highlands with 6,000 men and began the construction of Fort William at Inverlochy to pacify the region.
Meanwhile, in March 1689, James II had landed in Ireland. He intended to use it as a base from which to recover the English throne.
The composition of the rival armies in Ireland reflected the wider European war. William's forces included Irish, English, Dutch, Danish and German troops, while large French contingents fought on the Jacobite side.
Using the regular Irish regiments he had officered with Catholics a few years earlier, Richard Talbot, Earl of Tyrconnel, succeeded in reducing Williamite support to the besieged towns of Londonderry and Enniskillen.
Londonderry endured a three-month siege until Major-General Percy Kirke relieved the town in August 1689. Although the defenders held on defiantly, they showed little aggression and allowed themselves to be bottled up by smaller numbers of Jacobites.
The defenders of Enniskillen, on the other hand, conducted a brilliant campaign throughout 1689, using the town as a base to attack the enemy. On several occasions, they defeated larger Jacobite forces and successfully held on to the towns of Ballyshannon and Belleek, enabling them to be re-supplied by sea.
Their cavalry, under the energetic Colonel Thomas Lloyd, raided widely, boosting their supplies and keeping the Jacobites off balance.
In August 1689, William's main army landed at Carrickfergus led by Marshal Frederick Duke of Schomberg, a veteran German commander. A shortage of supplies and the rawness of many of his English troops prevented Schomberg from doing anything more than holding a bridgehead. Many of his men died in the army's autumn camp at Dundalk.
The following June, William himself landed at Carrickfergus to take over direction of the war, bringing with him veteran reinforcements. He advanced south against James, who retreated before him.
On 1 July 1690, the Jacobites attempted to defend a position on the river Boyne, near the town of Drogheda. Although it was strong in cavalry, James's army was outnumbered by William's and lacked effective artillery.
The Boyne was fordable and William used his numerical superiority to make a wide outflanking movement against the Jacobite left, pinning down many of James's best troops. Overcoming stiff resistance, the remaining Williamite forces broke through the centre and right of the Jacobite position, forcing James to retreat.
William was wounded in the leg during the battle. His second-in-command, the 75-year-old Duke of Schomberg, was killed rallying his troops during the struggle.
Defeated, James fled to France once more. But his army was able to continue the war for another year. It was routed at Aughrim on 12 July 1691 in one of the bloodiest battles ever fought on Irish soil, with over 7,000 men killed. This effectively marked the end of the Irish Catholic Jacobites’ resistance to William.
The town of Limerick held out for James until October 1691, when it surrendered as part of the peace agreement that brought the war in Ireland to an end.
The wider war in Europe was triggered by King Louis XIV's invasion of the Rhineland in October 1688. His aim was to strengthen French influence in the German states at the expense of the Holy Roman Empire, which was then engaged in a bitter war with the Turks. In response, a coalition of France's European rivals took up arms.
The Holy Roman Empire was France's main rival. It was ruled by the Habsburg family, a branch of which also ruled Spain. The Spanish Habsburg ruler, Charles II, had suffered from poor health throughout his life and was now seriously ill. With no direct heir, Charles's domains could pass to either of his closest dynastic relations, the Habsburgs of the Holy Roman Empire or the Bourbons of France.
The war in Europe was therefore partly about France and the Empire both jockeying for position in anticipation of the Spanish Habsburg line dying out.
Following his seizure of the English throne, William helped create the Grand Alliance, consisting of England, the Dutch Republic, Bavaria, Brandenburg, Saxony, the Holy Roman Empire, Spain, and Savoy. It sought to resist any further attempts by Louis XIV to expand his territorial and dynastic claims in Western Europe.
The new English king saw the war as a way of reducing Louis XIV's power. When the French invaded his native Dutch Republic back in 1672, William had successfully organised the resistance. And he was determined to avoid any repeat attack.
The French also posed a threat to William through their support of the exiled James II. Victory in the conflict would, therefore, help secure his recently won throne.
The main fighting on the Continent took place around France's borders: in the Spanish Netherlands (now Belgium and Luxembourg), the Rhineland, the Duchy of Savoy (now north-western Italy) and Catalonia. The French won several victories in the two latter regions, but they eventually withdrew from the Rhineland.
The war also extended to the overseas colonies of the contending powers. England and France, together with their native allies, fought in the Americas in ‘King William’s War’. The Anglo-Dutch navies also inflicted several defeats on the French to secure control of the seas.
The war in the Spanish Netherlands - another region that Louis wanted to annex - became a stalemate as one lengthy siege succeeded another.
Major battles, such as the French victories at Fleurus (1690), Steenkirk (1692) and Landen (1693), were comparatively rare and never decisive enough to bring about an end to the struggle.
Fought on 29 July 1693, Landen (or Neerwinden) was one of the bloodiest battles of the war. William tried to prevent the Duke of Luxembourg's French army from taking Brussels and Liege by engaging him at Landen, about 30 miles (48km) east of Brussels.
After fierce fighting, William was forced to abandon his position, but his army was able to retreat in fairly good order. The combined casualties of the two armies exceeded 25,000 men.
Although victorious, the French army suffered such great losses that the Duke of Luxembourg had to abandon any designs on Brussels and Liege.
William's greatest success was the retaking of Namur, a city around 35 miles (56km) south-east of Brussels. In 1692, the French had besieged and captured Namur in just 27 days. The city's defences were then improved by Vauban, Louis XIV's great military engineer.
Although the stronghold was generally considered impregnable, William’s allied army laid siege to it in June 1695, retaking it after two months. The Royal Regiment of Ireland led the storming of the citadel, which resulted in its surrender on 1 September.
Although the French were relatively successful in battle, they lacked the financial resources of the English and the Dutch. By the mid-1690s, France was also wracked by famine. However, the English and Dutch were financially exhausted by the fighting, too. And when Savoy defected from the Grand Alliance, all parties were keen for a settlement.
By the terms of the Treaty of Ryswick (1697), Louis XIV retained some of his war gains, including Alsace. But he was forced to return Lorraine to its ruler and give up any gains on the east bank of the Rhine.
Louis also accepted William as the rightful ruler of England, while the Dutch acquired a fortress system in the Spanish Netherlands to help secure their borders.
However, the treaty did not settle all of the issues that had caused the war. There was no resolution to the future of Spain, the most important question in contemporary European politics. And Louis remained determined to expand his domains. Accordingly, in 1701, the fighting was renewed in the War of the Spanish Succession (1701-13).
The prolonged fighting demanded a big increase in the size of the army. By 1697, British forces in the Netherlands numbered over 56,000 men. Many famous British regiments trace their origins to this period.
King William's army also looked very different from the forces of the Civil War (1642-51) period. Pikemen had nearly all disappeared, and most foot soldiers were now armed with muskets.
Paying for a large overseas military effort led to changes in the English economy. In 1694, the Bank of England was formed to help finance William's war. The Bank’s shareholders lent money to the Government at interest - the beginning of the National Debt.