Great Britain was one of the major participants in the Seven Years' War, which for Britain in fact lasted nine years, between 1754 and 1763. British involvement in the conflict began in 1754 in what became known as the French and Indian War. However the warfare in the European theatre involving countries other than Britain and France commenced in 1756 (hence the name "Seven Years' War"). Britain emerged from the war as the world's leading colonial power, having gained all of New France in North America, ending France's role as a colonial power there. Following Spain's entry in the war in alliance with France in the third Family Compact, Britain captured the major Spanish ports of Havana, Cuba and Manila, in the Philippines in 1762, and agreed to return them in exchange for Spanish Florida. The Treaty of Paris in 1763 formally ended the conflict and Britain established itself as the world's pre-eminent naval power.
The war started poorly for Britain, at the hands of France in North America during 1754–1755, and in the fall of Menorca in 1756. The same year Britain's major ally Austria switched sides and aligned itself with France, and Britain was hastily forced to conclude a new alliance with Frederick the Great's Prussia. For the next seven years these two nations were ranged against a growing number of enemy powers led by France. After a period of political instability, the rise of a government headed by the Duke of Newcastle and William Pitt the Elder provided Britain with firmer leadership, enabling it to consolidate and achieve its war aims.