Queen Elizabeth II, Britain’s longest-reigning monarch, died Thursday at age 96.

She ascended the throne in 1952 and reigned for more than seven decades. Elizabeth ruled the United Kingdom as it rebuilt from the devastation of World War II, lost an empire, transformed its economy and both entered and left the European Union.

World leaders were quick to relay messages after the death of the monarch.

New British Prime Minister Liz Truss released a statement that said, “We are all devastated by the news we have just heard from Balmoral. The death of Her Majesty the Queen is a huge shock to the nation and to the world. Queen Elizabeth II was the rock on which modern Britain was built. Our country has grown and flourished under her reign.

“It is an extraordinary achievement to have presided with such dignity and grace for 70 years. Her life of service stretched beyond most of our living memories. In return, she was loved and admired by the people in the United Kingdom and all around the world,” she said. “Today the Crown passes — as it has done for more than a thousand years — to our new monarch, our new head of state: His Majesty King Charles III.”

Ursula von der Leyen, president of the European Commission, tweeted: “She witnessed war and reconciliation in Europe and beyond, and deep transformations of our planet and societies. She was a beacon of continuity throughout these changes, never ceasing to display a calmness and dedication that gave strength to many. May she rest in peace.”

U.S. President Joe Biden said in a statement, “Her Majesty Queen Elizabeth II was more than a monarch. She defined an era.

“In a world of constant change, she was a steadying presence and a source of comfort and pride for generations of Britons, including many who have never known their country without her. … Her legacy will loom large in the pages of British history, and in the story of our world.”

Biden also ordered that U.S. flags be flown at half-staff, in the U.S. and abroad, in memory of the queen until her interment.

Irish Prime Minister Michael Martin called the queen “a remarkable friend” who had “great impact on the bonds of mutual understanding between our two peoples.”

He said, “Her State Visit to Ireland in 2011 marked a crucial step in the normalization of relations with our nearest neighbor. That visit was a great success, largely because of the many gracious gestures and warm remarks made by the Queen.”

Scottish leader Nicola Sturgeon, who supports independence for Scotland from the rest of Britain, called her death “a profoundly sad moment for the U.K., the Commonwealth and the world.”

“On behalf of the people of Scotland, I convey my deepest condolences to The King and the Royal Family,” Sturgeon said in a statement.

Canadian Prime Minister Justin Trudeau paid a tearful tribute to the queen, whom he first met as a child and admired personally, saying, “She was our queen for almost half of Canada’s existence. And she had an obvious, deep and abiding love and affection for Canadians.”

Trudeau first met the queen when his father, Pierre Trudeau, was prime minister in the 1970s.

“She was one of my favorite people in the world,” he said. “And I will miss her so. … She was thoughtful, wise, curious, helpful, funny and so much more.”

Australian Prime Minister Anthony Albanese said the passing of Queen Elizabeth marked the “end of an era.”

Queen Elizabeth was the only reigning U.K. monarch to have visited Australia as head of state.

New Zealand Prime Minister Jacinda Ardern paid tribute Friday to the “extraordinary” life of the late monarch, also declaring the new King Charles III as head of state.

“She was extraordinary,” Ardern said, while ordering flags to fly at half-staff and a state memorial service. “People throughout the world will be feeling an acute sense of loss at this time and New Zealanders most certainly share that grief.”

Bangladesh Prime Minister Sheikh Hasina, leader of a former British colony, “offered her deep condolences and expressed her sorrow at the death of Queen Elizabeth II,” Hasan Jahid Tusher, Hasina’s spokesman, told AFP.

India Prime Minister Narendra Modi said he was “pained” by the death of the queen, hailing her as a paragon of “dignity and decency.”

Elizabeth II, who acceded to the throne in 1952, was the first British monarch in more than a century not to have also reigned as either emperor or empress of India.

U.N. Secretary-General Antonio Guterres said, “Queen Elizabeth II was a good friend of the United Nations, and visited our New York headquarters twice, more than 50 years apart. She was deeply committed to many charitable and environmental causes and spoke movingly to delegates at the COP26 climate talks in Glasgow.

“I would like to pay tribute to Queen Elizabeth II for her unwavering, lifelong dedication to serving her people. The world will long remember her devotion and leadership.”

Pope Francis said he was “deeply saddened” at the death of Elizabeth, offering prayers for her “eternal rest” and for her son Charles as he becomes king.

In a personal telegram to the new monarch, the head of the Catholic Church paid tribute to the queen’s “life of unstinting service … her example of devotion to duty, her steadfast witness of faith in Jesus Christ,” and, addressing the new King Charles III, “I invoke an abundance of divine blessings as a pledge of comfort and strength in the Lord.”

This article includes information from The Associated Press, Reuters and Agence France-Presse.