1774 to 1816
In 1774 the American colonies had reached their breaking point with the British. In April of 1775 the Battles of Lexington and Concord brought the colonies into war with Britain and in July 4, 1776 the colonies formally declared their independence from the Empire. This began a long complicated war on three fronts as the revolutionaries attempted to defeat the British in Canada (with Americans being led be Guy Carleton), along the eastern seaboard (led by George Washington), and in the Caribbean against the mighty Royal Navy (led by William Briggs). The war went back and forth until the Battle of Vercheres in the winter of 1777 which stemmed the tide of the British invasion in Quebec, saved Montreal, and brought France and Spain into the war against Britain. Several key naval victories secured the Caribbean and forced the Royal Navy back to European waters to secure the home islands while a surprise operation saw the recapture of New York in 1778. The war heated up in the southern colonies as the British tried to rally the larger loyalist population there but it was to no avail. In late 1781 at the Battle of New Bern, Washington captured the last free roaming British army in North America and ended the war.
The loss of the American colonies, especially the Caribbean sugar islands, was a devastating blow to Britain. Budget cuts to the military weakened her global position but she was still the leading naval power and London's efforts refocused on India in an attempt to make up for financial losses in the Americas. However the events in France in the 1790's caught the British off guard and despite attempts to quash the bloody French Revolution and the subsequent rise of Napoleon, Britain could do little beyond fighting France with its seapower. In 1796 the revolutionaries managed a surprising naval victory and landing in Ireland where they combined with irish Catholic rebels to lead that island into revolt. The short lived Irish Catholic Republic was conquered but the event scarred Ireland and marred British politics for years, leading to the anti-war Henry Addington becoming prime minister briefly at the turn of the century. Britain's on again and off again and seemingly half-hearted crusade against Napoleon greatly upset its European allies, especially Austria and Russia. Defense cuts and apathy arguably saved Spain and Denmark from becoming battlegrounds in a wider war on the periphery of Europe between Britain and France however.
The Napoleonic Wars hit their stride in 1812 with the onset of war between the United States and Britain as part of the larger War of the Sixth Coalition. This conflict saw Britain engage the US across the globe, primarily in the Mediterranean (with their Ottoman allies), in North America (providing assistance to natives on the American frontier), in India (as part of the larger War of Indian Independence), and Australia (as part of the Australian Revolutionary War). While the War of the Sixth Coalition did see the downfall of Napoleon from power in Europe it also broke the British Empire with Gibraltar being transferred to the US, few goals in North Africa or North America being achieved, and the granting of independence to the various Indian states and Australia. Britain was compensated at the Congress of Vienna with the former Dutch East Indies and Cape Colony which were transferred to Britain despite the protests of the Dutch.
The late 1810's and early to mid 1820's saw a period of industrialization and reactionism in Britain. Conflicts between classes and questions of liberties became more prevalent in the wake of the French Revolution and industrialism, the Catholic question and Ireland remained issues, and a number of fairly draconian acts characterized the period as Britain became a semi-police state. As European roiled through the Unresolved Wars, British Prime Ministers Goderich, Bathurst, and Grey worked tirelessly to spare Britain revolution by undoing the post-Napoleonic police state and passing several liberalizing acts such as the 1830 Slavery Abolition Act and the 1831 Catholic Acts and Act of Union which finally granted Catholic relief and combined the Kingdom of Great Britain with the Kingdom of Ireland to form the United Kingdom.
The post-Napoleonic world saw Britain reorganize its empire in order to finance itself. Its control on the new British East Indies became more consolidated over the years and expanded to a degree on the Asian mainland along the Malay Peninsula. Britain would play a prominent role in the Asian Wars especially providing the bulk of naval forces that attacked coastal China in the War of the Korean Succession resulting in the British gain of Hong Kong and half of Formosa. Britain also expanded its holdings in Africa, especially in West Africa and South Africa.