William and Kate were greeted with cheers and rounds of applause from well-wishers and nurses as they began their first official visit to the Orkney Islands
The couple are touring Scotland as part of William's role as Lord High Commissioner to the General Assembly of the Church of Scotland.
Kirkwall City Pipe Band played as the couple arrived to open the new Balfour Hospital in Kirkwall.
Kate, 38, in a camel-coloured Massimo Dutti coat and Strathearn tartan scarf, looked pleased to see the 100-strong crowd who had gathered outside.
The Cambridges, known as the Earl and Countess of Strathearn in Scotland, were given a private tour of the 16,000m2 hospital with 700 rooms which is the biggest construction on the island since its Catherdral was completed in 1168.
NHS staff greeted the couple inside the main foyer with others crowded on walkways overlooking the main hall to get a glimpse of the royals.
After waving back to the crowds William gestured at Kate to pull the drawstring and reveal a plaque marking the visit.
Michael Dickson, CEO of the Orkney NHS Board, said afterwards: "It is first time a Lord High Commissioner has been to Orkney and William said he was delighted that had been noted on the plaque."
During the visit William, 38, praised trauma nurse Dr Tariro Gandiya. He said: "It must he reassuring to know we are all in this together." Kate added: "Well done".
Paul Maguire, catering assistant, spoke to Kate and William in the hospital’s sensory garden.
He said afterwards: "We spoke about how it has been in the last year and I explained how we split into two teams so I hadn’t seen most of my colleagues till now. Its been tough.
"He asked what the most popular meal was and I told him it was macaroni cheese."
They were also met at the hospital by Meghan McEwen Chairman of NHS Orkney, Alistair Carmichael MP for Orkney and Shetland and Liam McArthur MSP.
It was the couple’s first visit to the Orkney Islands.
Balfour Hospital in Kirkwall has been taking patients for for two years. It replaced the old hospital, which had served the community for ninety years.
It has enabled the repatriation of many NHS services from the Scottish mainland, allowing Orkney’s population to receive most of their healthcare at home.
The new building’s circular design is based on the 5,000-year-old Neolithic settlement, Skara Brae.