The Duke of Edinburgh has been admitted to hospital with a recurrence of the bladder infection that he had in June, Buckingham Palace has said.
Prince Philip was taken to Aberdeen Royal Infirmary while staying with the Queen at her retreat at Balmoral, a spokeswoman said.
A statement said:
Earlier, it had been announced that Prince Philip had been taken to hospital by ambulance this afternoon as a "precautionary measure".
It is the Duke's third hospital visit in the past eight months.
Before he was admitted to hospital, Prince Philip was photographed in Cowes on the Isle of Wight on Wednesday morning.
Michael Dunkason, who took the picture said: "The Duke had just come ashore on the Trinity House no.1 boat from the Galatea.
"He seemed to be spritely and in good form. He gave a farewell wave and his usual smile."
The Duke's latest hospital admission comes 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.
It forced him to miss several key events of the Queen's Diamond Jubilee celebrations, including a star-studded concert outside Buckingham Palace.
The Duke of Edinburgh was also treated at Papworth Hospital, near Cambridge, after undergoing heart surgery to have a stent fitted last December.
Before the heart scare he had been fit and apparently healthy, and led the active life of a man of younger years.
In March, his grandson Prince Harry said the operation had given him "a new spurt of life".
Earlier this week, the Duke of Edinburgh was in the Isle of Wight for Cowes Week, a long-running regular regatta.
He also found time to visit a family-run factory in Newport.
Onlookers said the Duke had a spring in his step while walking round the factory and there were no signs of ill health.
Prince Philip also attended a garden party with the Queen at Balmoral Castle, earlier this month.
He was also at the Queen's side during the opening ceremony of the Olympics Games on July 27 and the following day when they toured the Olympic Park.
Dr Malcolm VandenBurg, a Harley Street specialist in general medicine and male health problems, has said there could be numerous causes for the recurrence of Prince Philip's bladder infection.
The consultant said there were three more likely causes: an enlargement of the prostate gland, cancer in the prostate or an infection in the actual prostate.