EDINBURGH, Scotland (AP) — As Queen Elizabeth II’s four children walked silently behind, a hearse carried her flag-draped coffin along a crowd-lined street in the Scottish capital Monday to a cathedral, where a service of thanksgiving hailed the late monarch as a “constant in all of our lives for over 70 years.”

Four days after the 96-year-old queen died at her beloved Balmoral Castle in the Scottish Highlands, a military bagpiper played as her oak coffin, draped in the red-and-yellow Royal Standard of Scotland, was borne from the Palace of Holyroodhouse in Edinburgh under late-summer sunshine.

King Charles III, dressed in army uniform, and Princess Anne, Prince Andrew and Prince Edward walked behind as the hearse traveled to St. Giles’ Cathedral, flanked by a bearer party of the Royal Regiment of Scotland and a detachment of the Royal Company of Archers, the king’s ceremonial bodyguard in Scotland.

Inside, the coffin was placed on a wooden stand an topped with the golden Crown of Scotland, encrusted with 22 gems and 20 precious stones along with freshwater pearls from Scotland’s rivers.

“And so we gather to bid Scotland’s farewell to our late monarch, whose life of service to the nation and the world we celebrate. And whose love for Scotland was legendary,” said the Rev. Calum MacLeod.

Because the queen died at her summer home of Balmoral, Scotland has been the focus of the world’s attention for the first part of Britain’s 10 days of national mourning. Scenes of large crowds lining the route as her coffin journeyed south have underscored the deep bond between the queen and Scotland, which persisted even as relations between the Conservative U.K. government in London and the pro-independence administration in Edinburgh have soured.

In a homily, Church of Scotland Moderator Iain Greenshields said that “most of us cannot recall a time when she was not our monarch.”

“Committed to the role she assumed in 1952 upon the death of her beloved father, she has been a constant in all of our lives for over 70 years,” he said. “She was determined to see her work as a form of service to others, and she maintained that steady course until the end of her life.

The coffin will remain at the cathedral until Tuesday so members of the public can pay their respects. Thousands lined the 0.7-mile (1 kilometer) route between palace and cathedral, some arriving hours ahead of the service to catch a glimpse of the coffin.

“I just wanted to be here, just to show … last respects. I cannot believe she is dead,” said Marilyn Mclear, a 70-year-old retired teacher. “I know she was 96, but I just cannot believe the queen’s dead.”

One man appeared to shout angrily at the passing hearse, while others called out: “God save the king!” But the procession was greeted mostly with a respectful silence under a blue sky flecked with white clouds.

Charles, Anne and Edward all wore military uniforms during the procession, but Andrew did not. The Royal Navy veteran was stripped of his honorary military titles and was removed as a working royal over his friendship with the notorious U.S. sex offender Jeffrey Epstein.

Charles later donned a kilt as he visited the Scottish parliament, where he was greeted by First Minister Nicola Sturgeon.

Earlier, the queen’s grandson, Prince Harry, hailed her as a “guiding compass” and praised her “unwavering grace and dignity.”

The government, meanwhile, announced the nation will observe a minute of silence on Sunday, the evening before the queen’s funeral. The “moment of reflection” will take place at 8 p.m. (1900 GMT, 3 p.m. EDT). People were encouraged to mark the silence at home or at community events.

Before flying to Scotland, Charles received condolences at Parliament and told lawmakers he would follow his late mother’s example of “selfless duty.”

Hundreds of lawmakers crowded into the 1,000-year-old Westminster Hall for the service, rich in pageantry, in which Parliament offered its condolences to the king. A trumpet fanfare greeted him and Camilla as they entered.

Charles told members of the House of Commons and House of Lords that he would follow his late mother in upholding “the precious principles of constitutional governance” that underpin the U.K.’s political system.

“As I stand before you today, I cannot help but feel the weight of history which surrounds us and which reminds us of the vital parliamentary traditions to which members of both Houses dedicate yourselves, with such personal commitment for the betterment of us all,” Charles said.

The ceremony was held in Westminster Hall because monarchs are not allowed inside the House of Commons. That rule dates from the 17th century, when King Charles I tried to enter and arrest lawmakers. That confrontation between crown and Parliament led to a civil war which ended with the king being beheaded in 1649.

In a personal tribute to his grandmother, Prince Harry said he cherished their times together “from my earliest childhood memories with you, to meeting you for the first time as my Commander-in-Chief, to the first moment you met my darling wife and hugged your beloved greatgrandchildren.”

Amid acrimony in the House of Windsor, Harry quit as a senior royal and moved to the U.S. two years ago. On Saturday, there was a possible sign of a reconciliation as Harry and his wife Meghan joined his brother Prince William and sister-in-law Catherine in meeting mourners outside Windsor Castle.

Harry’s statement ended on a poignant note alluding to the death last year of his grandfather, Prince Philip, saying that, “We, too, smile knowing that you and grandpa are reunited now, and both together in peace.”

The queen’s coffin will be flown Tuesday to London, where it will lie in state at the Houses of Parliament Palace from Wednesday afternoon until the morning of her funeral on Sept. 19. U.S. President Joe Biden is due to attend the service at Westminster Abbey, along with heads of state and royalty from around the world.

Authorities already have issued rules and guidelines for people wanting to pay their respects in London.

Judging by the size of the crowd in Edinburgh, the line is expected to be long.

Rosamund Allen, 67, came from from Rothbury in northern England to be part of the moment.

“It was very moving. It was very quiet,” she said. “I felt very sorry for the family itself to be on show. They are very brave to do that. And I really hope and pray that they get something out of today and have a chance to mourn themselves.

“They were very kind to allow us to be part of their sadness.”

___

Corder and Lawless reported from London.

___

Follow AP stories on the death of Queen Elizabeth II and Britain’s royal family at https://apnews.com/hub/queen-elizabeth-ii