LONDON (AP) — Queen Elizabeth II, Britain’s longest-reigning monarch and a rock of stability across much of a turbulent century, died Thursday after 70 years on the throne. She was 96.

The palace announced she died at Balmoral Castle, her summer residence in Scotland, where members of the royal family had rushed to her side after her health took a turn for the worse.

A link to the almost-vanished generation that fought World War II, she was the only monarch most Britons have ever known, and her name defines an age: the modern Elizabethan Era.

The impact of her loss will be huge and unpredictable, both for the nation and for the monarchy, an institution she helped stabilize and modernize across decades of huge social change and family scandals.

With the death of the queen, her 73-year-old son Charles automatically becomes monarch, though the coronation might not take place for months. It is not known whether he will choose to call himself King Charles III or some other name.

The queen’s life was indelibly marked by the war. As Princess Elizabeth, she made her first public broadcast in 1940 when she was 14, sending a wartime message to children evacuated to the countryside or overseas.

“We children at home are full of cheerfulness and courage,” she said with a blend of stoicism and hope that would echo throughout her reign. “We are trying to do all we can to help out gallant soldiers, sailors and airmen. And we are trying, too, to bear our own share of the danger and sadness of war. We know, every one of us, that in the end all will be well.”

Since Feb. 6, 1952, Elizabeth reigned over a Britain that rebuilt from war and lost its empire; joined the European Union and then left it; and transformed from industrial powerhouse to uncertain 21st century society. She endured through 15 prime ministers, from Winston Churchill to Liz Truss, becoming an institution and an icon -- a fixed point and a reassuring presence even for those who ignored or loathed the monarchy.

She became less visible in her final years as age and frailty curtailed many public appearances. But she remained firmly in control of the monarchy and at the center of national life as Britain celebrated her Platinum Jubilee with days of parties and pageants in June 2022.

The same month she became the second longest-reigning monarch in history, behind 17th-century French King Louis XIV, who took the throne at age 4. On Sept. 6, 2022, she presided at a ceremony at Balmoral Castle to accept the resignation of Boris Johnson as prime minister and appoint Truss as his successor.

When Elizabeth was 21, almost five years before she became queen, she promised the people of Britain and the Commonwealth that “my whole life, whether it be long or short, shall be devoted to your service.”

It was a promise she kept across more than seven decades.

Despite Britain’s complex and often fraught ties with its former colonies, Elizabeth was widely respected and remained head of state of more than a dozen countries, from Canada to Tuvalu. She headed the 54-nation Commonwealth, built around Britain and its former colonies.

Married for more than 73 years to Prince Philip, who died in 2021 at age 99, Elizabeth was matriarch to a royal family whose troubles were a subject of global fascination -- amplified by fictionalized accounts such as TV series “The Crown.” She is survived by four children, eight grandchildren and 12 great-grandchildren.

Through countless public events, she probably met more people than anyone in history. Her image, which adorned stamps, coins and banknotes, was among the most reproduced in the world.

But her inner life and opinions remained mostly an enigma. Of her personality, the public saw relatively little. A horse owner, she rarely seemed happier than during the Royal Ascot racing week. She never tired of the companionship of her beloved Welsh corgi dogs.

Elizabeth Alexandra Mary Windsor was born in London on April 21, 1926, the first child of the Duke and Duchess of York. She was not born to be queen -- her father’s elder brother, Prince Edward, was destined for the crown, to be followed by any children he had.

But in 1936, when she was 10, Edward VIII abdicated to marry twice-divorced American Wallis Simpson, and Elizabeth’s father became King George VI.

Princess Margaret recalled asking her sister whether this meant that Elizabeth would one day be queen. ”’Yes, I suppose it does,’” Margaret quoted Elizabeth as saying. “She didn’t mention it again.”

Elizabeth was barely in her teens when Britain went to war with Germany in 1939. While the king and queen stayed at Buckingham Palace during the Blitz and toured the bombed-out neighborhoods of London, Elizabeth and Margaret spent most of the war at Windsor Castle, west of the capital. Even there, 300 bombs fell in an adjacent park, and the princesses spent many nights in an underground shelter.

In 1945, after months of campaigning for her parents’ permission to do something for the war effort, the heir to the throne became Second Subaltern Elizabeth Alexandra Mary Windsor in the Auxiliary Territorial Service. She enthusiastically learned to drive and service heavy vehicles.

On the night the war ended in Europe, May 8, 1945, she and Margaret managed to mingle, unrecognized, with celebrating crowds in London — “swept along on a tide of happiness and relief,” as she told the BBC decades later, describing it as “one of the most memorable nights of my life.”

At Westminster Abbey in November 1947 she married Royal Navy officer Philip Mountbatten, a prince of Greece and Denmark whom she had first met in 1939 when she was 13 and he 18. Postwar Britain was experiencing austerity and rationing, and so street decorations were limited and no public holiday was declared. But the bride was allowed 100 extra ration coupons for her trousseau.

The couple lived for a time in Malta, where Philip was stationed, and Elizabeth enjoyed an almost-normal life as a navy wife. The first of their four children, Prince Charles, was born on Nov. 14, 1948. He was followed by Princess Anne on Aug. 15, 1950, Prince Andrew on Feb. 19, 1960, and Prince Edward on March 10, 1964.

In February 1952, George VI died in his sleep at age 56 after years of ill health. Elizabeth, on a visit to Kenya, was told that she was now queen.

Her private secretary, Martin Charteris, later recalled finding the new monarch at her desk, “sitting erect, no tears, color up a little, fully accepting her destiny.”

“In a way, I didn’t have an apprenticeship,” Elizabeth reflected in a BBC documentary in 1992 that opened a rare view into her emotions. “My father died much too young, and so it was all a very sudden kind of taking on, and making the best job you can.”

Her coronation took place more than a year later, a grand spectacle at Westminster Abbey viewed by millions through the still-new medium of television.

Prime Minister Winston Churchill’s first reaction to the king’s death was to complain that the new queen was “only a child,” but he was won over within days and eventually became an ardent admirer.

In Britain’s constitutional monarchy, the queen is head of state but has little direct power; in her official actions she does what the government orders. However, she was not without influence. She once reportedly commented that there was nothing she could do legally to block the appointment of a bishop, “but I can always say that I should like more information. That is an indication that the prime minister will not miss.”

The extent of the monarch’s political influence occasionally sparked speculation -- but not much criticism while Elizabeth was alive. The views of Charles, who has expressed strong opinions on everything from architecture to the environment, might prove more contentious.

She was obliged to meet weekly with the prime minister, and they generally found her well-informed, inquisitive and up to date. The one possible exception was Margaret Thatcher, with whom her relations were said to be cool, if not frosty, though neither woman ever commented.

The queen’s views in those private meetings became a subject of intense speculation and fertile ground for dramatists like Peter Morgan, author of the play “The Audience” and the hit TV series “The Crown.” Those semi-fictionalized accounts were the product of an era of declining deference and rising celebrity, when the royal family’s troubles became public property.

And there were plenty of troubles within the family, an institution known as “The Firm.” In Elizabeth’s first years on the throne, Princess Margaret provoked a national controversy through her romance with a divorced man.

In what the queen called the “annus horribilis” of 1992, her daughter, Princess Anne, was divorced, Prince Charles and Princess Diana separated, and so did Prince Andrew and his wife, Sarah. That was also the year Windsor Castle, a residence she far preferred to Buckingham Palace, was seriously damaged by fire.

The public split of Charles and Diana -- “There were three of us in that marriage,” Diana said of her husband’s relationship with Camilla Parker Bowles -- was followed by the shock of Diana’s death in a Paris car crash in 1997. For once, the queen appeared out of step with her people.

Amid unprecedented public mourning, Elizabeth’s failure to make a public show of grief appeared to many to be unfeeling. After several days, she finally made a televised address to the nation.

The dent in her popularity was brief. She was by now a sort of national grandmother, with a stern gaze and a twinkling smile.

Despite being one of the world’s wealthiest people, Elizabeth had a reputation for frugality and common sense. She was known as a monarch who turned off lights in empty rooms, a country woman who didn’t flinch from strangling pheasants.

A newspaper reporter who went undercover to work as a palace footman reinforced that down-to-earth image, capturing pictures of the royal Tupperware on the breakfast table and a rubber duck in the bath.

Her sangfroid was not dented when a young man aimed a pistol at her and fired six blanks as she rode by on a horse in 1981, nor when she discovered a disturbed intruder sitting on her bed in Buckingham Palace in 1982.

The image of the queen as an exemplar of ordinary British decency was satirized by the magazine Private Eye, which called her Brenda. Anti-monarchists dubbed her “Mrs. Windsor.” But the republican cause gained limited traction while the queen was alive.

On her Golden Jubilee in 2002, she said the country could “look back with measured pride on the history of the last 50 years.”

“It has been a pretty remarkable 50 years by any standards,” she said in a speech. “There have been ups and downs, but anyone who can remember what things were like after those six long years of war appreciates what immense changes have been achieved since then.”

A reassuring presence at home, she was also an emblem of Britain abroad — a form of soft power, consistently respected whatever the vagaries of the country’s political leaders on the world stage. It felt only fitting that she attended the opening of the 2012 London Olympics alongside another icon, James Bond. Through some movie magic, she appeared to parachute into the Olympic Stadium.

In 2015, she overtook her great-great-grandmother Queen Victoria’s reign of 63 years, seven months and two days to become the longest-serving monarch in British history. She kept working into her 10th decade, though Prince Charles and his elder son, Prince William, increasingly took over the visits, ribbon-cuttings and investitures that form the bulk of royal duties.

The loss of Philip in 2021 was a heavy blow, as she poignantly sat alone at his funeral in the chapel at Windsor Castle because of coronavirus restrictions.

And the family troubles continued. Her son Prince Andrew was entangled in the sordid tale of sex offender businessman Jeffrey Epstein, an American businessman who had been a friend. Andrew denied accusations that he had sex with one of the women who said she was trafficked by Epstein.

The queen’s grandson Prince Harry walked away from Britain and his royal duties after marrying American actress Meghan Markle in 2018. He alleged in an interview that some in the family -– but pointedly not the queen -– had been less than welcoming to his wife.

She enjoyed robust health well into her 90s, although she used a cane in an appearance after Philip’s death. In October 2021, she spent a night in a London hospital for tests after canceling a trip to Northern Ireland.

A few months later, she told guests at a reception “as you can see, I can’t move.” The palace, tight-lipped about details, said the queen was experiencing “episodic mobility issues.”

She held virtual meetings with diplomats and politicians from Windsor Castle, but public appearances grew rarer. The queen withdrew from fixtures of the royal calendar, including Remembrance Sunday and Commonwealth Day ceremonies, though she attended a memorial service last March for Philip at Westminster Abbey.

Meanwhile, she took steps to prepare for the transition to come. In February, the queen announced that she wanted Charles’ wife Camilla to be known as “Queen Consort” when “in the fullness of time” her son became king. It removed a question mark over the role of the woman some blamed for the breakup of Charles’ marriage to Princess Diana in the 1990s.

May brought another symbolic moment, when she asked Charles to stand in for her and read the Queen’s Speech at the State Opening of Parliament, one of the monarch’s most central constitutional duties.

Seven decades after World War II, Elizabeth was again at the center of the national mood amid the uncertainty and loss of COVID 19 -- a disease she came through herself in February.

In April 2020 -- with the country in lockdown and Prime Minister Boris Johnson hospitalized with the virus -- she made a rare video address, urging people to stick together.

She summoned the spirit of World War II, that vital time in her life, and the nation’s, by echoing Vera Lynn’s wartime anthem “We’ll Meet Again.”

“We should take comfort that while we may have more still to endure, better days will return. We will be with our friends again. We will be with our families again. We will meet again,” she said.