As firefighters revealed they were no longer expecting to find anyone else alive at the Grenfell Tower in North Kensington, a statement released by Buckingham Palace also paid tribute to the "bravery" of firefighters.
Her Majesty said: "My thoughts and prayers are with those families who have lost loved ones in the Grenfell Tower fire and the many people who are still critically ill in hospital."
London Fire Commissioner Dany Cotton said on Thursday morning that the number of bodies in the 24 storey building was still "unknown". The death toll is expected to rise further.
She told Sky News: "Tragically now we are not expecting to find anyone else alive. The severity and the heat of the fire would mean it is an absolute miracle for anyone to be left alive."
Firefighters are still to search the upper floors of the building. Prime Minister Theresa May visited the scene on Thursday where she spoke with emergency service personnel.
The Queen went on to say: "Prince Philip and I would like to pay tribute to the bravery of firefighters and other emergency services officers who put their own lives at risk to save others.
"It is also heartening to see the incredible generosity of community volunteers rallying to help those affected by this terrible event."
Dozens of people attended a vigil outside Notting Hill Methodist Church - a short distance away from the Grenfell Tower - on Wednesday evening.
Rev Mike Long said: "There are times when all the words we can say are not adequate and sometimes words fail us because no words can do justice to how we feel, or what we have seen or what has happened. Today is one of those days.
"What we can simply do is look to all that we have seen today which is good, which is fabulous - people getting together."
The fire's cause is still under investigation.