Queen Elizabeth II's reign encompassed to a large degree Britain's declining global influence, from an empire that once bestrode the world to a middle-ranking economy.

During her time as queen, the footprint of her monarchy shrank dramatically, but at her death she was still head of state of the United Kingdom and 14 Commonwealth countries or realms, from Canada and Jamaica to Australia and New Zealand.

At her coronation in 1953, Elizabeth II was crowned queen of seven independent countries: the United Kingdom, Canada, Australia, New Zealand, South Africa, Pakistan and Ceylon, which later changed its name to Sri Lanka.

The numbers grew as decolonisation accelerated and British colonies and dependencies became new Commonwealth realms.

Some decided to keep her as head of state, others did not.

Where she remained queen, the role was largely ceremonial, and her duties were carried out by one of her governor generals -- a viceroy who effectively acts as head of state.

She was the queen of each newly independent country in its own right, not merely because she was the British monarch previously.

At her death, she was head of state of: Antigua and Barbuda, Australia, The Bahamas, Belize, Canada, Grenada, Jamaica, New Zealand, Papua New Guinea, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines, Solomon Islands, Tuvalu and the UK.

These countries are distinct from the broader 54-state Commonwealth of nations that have historical ties to the United Kingdom, but did not necessarily choose to have the queen as head of state.

Over her entire reign, she was head of state of 32 countries in total.

Seventeen of those decided to cut ties at some point after becoming independent. They were:

Barbados 1966-2021

Ceylon (Sri Lanka) 1952-1972

Fiji 1970-1987

The Gambia 1965-1970

Ghana 1957-1960

Guyana 1966-1970

Kenya 1963-1964

Malawi 1964-1966

Malta 1964-1974

Mauritius 1968-1992

Nigeria 1960-1963

Pakistan 1952-1956

Sierra Leone 1961-1971

South Africa 1952-1961

Tanganyika 1961-1962

Trinidad and Tobago 1962-1976

Uganda 1962-1963

At the peak, she was queen of 18 countries at the same time, between 1983 and 1987. Since then, Fiji (1987), Mauritius (1992) and Barbados (2021) have become republics.

When Rhodesia -- Zimbabwe today -- unilaterally declared its independence from Britain in 1965, it proclaimed its allegiance to the queen before declaring itself a republic with a president in 1970, although its status was never recognised internationally.

Being queen of New Zealand also meant she was the head of state of the Cook Islands and Niue, which are associated states that form part of the wider realm of New Zealand.

Britain has 14 overseas territories, including Bermuda, the Falkland Islands, Gibraltar and British Antarctic Territory, over which she also ruled.

Her shortest reigns were in Kenya, Tanganyika -- now the major part of Tanzania -- and Uganda, which each lasted exactly a year between independence from Britain and becoming a republic.

During her time on the throne, eight referendums were held on becoming a republic, three of which passed: Ghana (1960), South Africa (1960) and The Gambia (1970).

Barbados declared itself a republic without holding a referendum.

Those that did not pass were a first referendum in The Gambia (1965), two in Tuvalu (1986 and 2008), Australia (1999) and Saint Vincent and the Grenadines (2009).