LONDON (CNN) -

Queen Elizabeth II gave thanks for four days of spectacular Diamond Jubilee celebrations in an unusual televised broadcast Tuesday after a flyover at Buckingham Palace brought the occasion to a colorful close.

Aircraft from the Battle of Britain -- including Spitfires and a Hurricane -- and the Red Arrows display team roared over the palace in a dramatic finale to the festivities, trailing red, white and blue smoke.

Huge crowds of well-wishers who had gathered to cheer the queen as she traveled by carriage procession from Westminster to Buckingham Palace surged up The Mall to hail the royals as they stepped out.

The queen's elderly husband, Prince Philip, was absent for the service of thanksgiving at St. Paul's Cathedral and carriage procession through London after being admitted to a London hospital with a bladder infection.

But the monarch was flanked on the balcony by her son Prince Charles and grandsons Prince William and Prince Harry, as well as the Duchess of Cornwall and Catherine, Duchess of Cambridge.

Soldiers fired into the air in the forecourt of the palace, giving the so-called feu de joie rifle salute, as a military band played the national anthem, accompanied by the flag-waving crowds. They then gave three rousing cheers for the queen.

The 86-year-old, smiling broadly and looking moved by the scale of the tribute, waved repeatedly before retiring back through the balcony doors into the palace.

The queen expressed her thanks to all those involved in the "massive challenge" of organizing the jubilee celebrations in a rare televised broadcast. She normally gives such broadcasts only at Christmas.

"It has touched me deeply to see so many thousands of families, neighbors and friends celebrating together in such a happy atmosphere," she said, in a message recorded Monday at the palace.

"I hope that memories of all this year's happy events will brighten our lives for many years to come. I will continue to treasure and draw inspiration from the countless kindnesses shown to me from this country and throughout the Commonwealth. Thank you all."

Squadron Leader Ian Smith, the officer in command of the Battle of Britain Memorial Flight, said beforehand that the group was honored to be taking part in the jubilee flyover.

"As a service, the RAF is enormously proud of its heritage, and the opportunity to fly over Buckingham Palace for her majesty with the nation's aviation heritage is something that will remain with us for the rest of our lives," he said.

Barbara Robinson of Hartlepool in northern England spent four hours waiting on the Mall for the queen's procession to pass before walking down to the palace.

"We saw the queen on the balcony, and the flypast, sang 'God Save the Queen' and gave her three cheers," she said.

"It's been a wonderful weekend. The atmosphere was just fantastic. Everyone has been so excited and so friendly. Right the way through, from Sunday until now, there hasn't been one cross word. It's a cliche, but this really is what we do best."

Her husband, Charlie, added, "It was lovely to see so many Union Jacks everywhere. It would be great if they stayed out on display."

The queen and the Duke of Edinburgh had been expected to lead the carriage procession to the palace in the 1902 State Landau, the horse-drawn open-top carriage used by the Duke and Duchess of Cambridge after their wedding at Westminster Abbey last year.

But instead, the queen, who smiled as she waved to those lining the route, was accompanied in the ornate carriage by Prince Charles and the Duchess of Cornwall, the prince also doffing his hat to those they passed.

Prince William, the Duchess of Cambridge and Prince Harry followed in a second carriage.

Prince Philip, who will turn 91 on Sunday, is recovering at a central London hospital and is expected to remain under observation for several days. He was visited in a hospital Tuesday by Prince Edward, his wife, the Countess of Wessex, and their two children.

As they left the hospital, Prince Edward said his father was doing much better and just needed more rest. He also said the Duke of Edinburgh had watched the day's proceedings on television.

The Countess of Wessex said the Duke of Edinburgh was in good spirits and on good form.

"He is, understandably, disappointed" not to be taking part in Tuesday's events, the queen's press secretary said in a statement Monday.

In the absence of Prince Philip, the queen had Prince Charles and her grandsons at her side for the service of thanksgiving held Tuesday morning at St Paul's Cathedral, the formal highlight of four days of celebrations to mark her 60-year reign.

Following a formal lunch, the queen and other members of the royal family returned in procession to Buckingham Palace, through streets lined with members of the armed services and enthusiastic well-wishers.