Glasgow's new hospital has been renamed the Queen Elizabeth University Hospital after the monarch officially opened it.
The £842m facility, formerly known as the South Glasgow University Hospital, started taking patients in April.
The Queen and the Duke of Edinburgh visited the hospital and the next-door Royal Hospital for Sick Children during a day in Glasgow.
The 1,109-bed facility was built on the site of Southern General is one of the largest acute hospitals in the UK.
The new campus, which has been dubbed a "super-hospital", replaces the Royal Hospital for Sick Kids at Yorkhill, the Southern General Hospital, the Western and Victoria infirmaries and the Mansionhouse Unit.
Operated by NHS Greater Glasgow and Clyde, it incorporates two accident and emergency departments, one for adults and one for children, a maternity hospital, and state-of-the-art laboratory services.
During their visit to Glasgow, the Queen and Prince Philip also attended the opening of a new research unit at Strathclyde University, where they took part in a minute's silence for the victims of the Tunisia shootings.
They then attended the official openings of the two hospitals, which were formally named the Queen Elizabeth University Hospital and the Royal Hospital for Sick Children.
The royals were greeted by First Minister Nicola Sturgeon and Health Minister Shona Robison, before embarking on a tour of the wards where they met patients and staff.