The monarch also sent her “deepest sympathy” to those injured in Friday’s brutal slaughter in Sousse which left at least 15 Britons dead.
As tributes were paid to the victims by family and friends, Buckingham Palace released a statement from the Queen saying: “Prince Philip and I were shocked to learn of the attack on British tourists in Tunisia on Friday.
“We send our sincere condolences to the families of those who were killed and our deepest sympathy to the people who are still fighting for their lives in hospital, and those who have been seriously injured.
“Our thoughts and prayers are with those of all countries who have been affected by this terrible event.”
Home Secretary Theresa May said the British deaths figure was expected to rise as more information comes out. Three Irish people are also among the dead.
The killing spree by Kalashnikov-wielding student Seifeddine Rezgui targeted western tourists on the beach at the RIU Imperial Marhaba and the RIU Bellevue and only ended when he was shot dead by police. A bomb was found on his body.
Investigators have revealed they are looking for at least one more accomplice, with an Interior Ministry spokesman telling the Associated Press they are sure that Rezgui had help.