Prince Philip is responding well to hospital treatment after a recurrence of a bladder infection, Buckingham Palace says.
Philip was taken to Aberdeen Royal Infirmary while staying with the Queen at her retreat at Balmoral.
In a statement, the palace said: "The Duke of Edinburgh is responding well to treatment. It is unclear when he will be discharged, but he is likely to remain in hospital for a few more days."
The 91-year-old royal made the journey of about 80 kilometres from the castle to the city hospital by road in an ambulance on Wednesday, the palace said.
Philip's latest health scare came two-and-a-half months after he spent five nights in hospital with a bladder infection following the Diamond Jubilee Pageant on the River Thames.
He was forced to miss some of the celebrations for his wife's 60 years on the throne after he was admitted to the King Edward VII Hospital in London the day after braving the elements on a barge for several hours.
Philip also underwent a successful procedure to clear a blocked coronary artery last December and was in hospital for four nights over Christmas.
Before the heart scare he had been fit and apparently healthy, and led the active life of a man of younger years.
In March this year his grandson Prince Harry said the operation had given him "a new spurt of life".
Philip went to Balmoral after attending a number of Olympic events. He was at the Queen's side during the Opening Ceremony on July 27 and the following day when they toured the Olympic Park.
He then watched his granddaughter Zara Phillips' Olympic equestrian debut on July 29 and was at the ExCeL exhibition centre a few days later to watch boxing.
The duke also appeared to be in good spirits as he watched yacht racing events on the Isle of Wight earlier this week.