Finally, the British were never able to prevent a steady flow of arms, ammunition, instructors and fighters from entering the colonies from abroad. Thus Washington, whose Continental Army was down to a few thousand fit soldiers, managed to survive the harsh winter of 1777-78 at Valley Forge and rebuild his military strength. When the British switched their main effort to the Southern colonies, Nathanael Greene, probably the most successful insurgent leader in military history until Mao Zedong, was able to wear down Cornwallis’s army in the Carolinas to a point where Washington, now reinforced by the French, was able to beat the British in a conventional battle at Yorktown.

It had truly been the wrong war in the wrong place at the wrong time. So how did Britain recover? War is the parent of illusions, and the first step in ending a war must be to shatter those illusions. It takes courage to accept defeat and vision to see that good can emerge from what appears to be disaster.

On hearing the news of the defeat at Yorktown, Lord North, the prime minister and architect of the war, is reported to have thrown his arms in the air exclaimed, “Oh, God, it’s all over.” In fact, for Britain it was just beginning. The nation was on the threshold of the industrial revolution; some rising politicians, like William Pitt (the younger one), could see beyond the end of the war and plan for Britain’s rapid political and economic recovery.

This was no easy task. Britain was near bankruptcy when peace with America was officially signed. Pitt, however, realized that because of industrialization his nation was about to experience unprecedented economic growth. He rose to prime minister in 1783 and set about creating the necessary economic conditions for Britain to become the workshop of the world.

Pitt also passed the India Bill in 1784 — thus ensuring that the sort of poor administration that had soured relations with the American colonies would not be repeated in Britain’s other territories. (It also created the position of governor general in India, in which Cornwallis more than redeemed himself from his Yorktown disgrace.)

Most important, Pitt set about rebuilding the British Navy and Army, for he could see that war with France was looming once again. He would often visit the yards to ensure that ships were being constructed on time. Under the energetic direction of the Duke of York, the king’s second son, the army was reorganized and retrained. New commanders were appointed for both services — men like Nelson and Wellington — who were determined not to make the same mistakes as their predecessors. It is hardly an overstatement to say that had Britain not ended the American War of Independence when it did, it could never have been in a position to defeat Napoleon.