Prince Philip, the 91-year-old husband of Queen Elizabeth II, has been admitted to hospital for "exploratory" surgery and is likely to stay there for two weeks, Buckingham Palace said.
"His Royal Highness The Duke of Edinburgh has been admitted to the London Clinic for an exploratory operation following abdominal investigations. He is expected to stay in hospital for up to two weeks," a statement said.
A Buckingham Palace spokeswoman later said he was "in very good health" and that the operation would be conducted under general anaesthetic.
Doctors have carried out tests over the last week, and decided he should undergo surgery on Friday, according to the domestic Press Association.
The duke, who turns 92 on Monday, was hospitalised twice last year for a bladder infection that forced him to miss the last of the queen's huge diamond jubilee celebrations.
He also suffered a blocked coronary artery the previous Christmas that required surgery.
The duke travelled to the hospital by car on Thursday for his planned procedure after attending a garden party at the palace, where he chatted animatedly with the guests.
The duke and his wife appeared together on the steps of the palace, three-and-a-half hours before details of his hospital visit were announced.
Guest John Peace said Philip had been "telling jokes", adding "it was wonderful" to see him with the queen.
Prime Minister David Cameron's office sent a message to the prince on Twitter, saying: "The prime minister wishes the Duke of Edinburgh a swift recovery."
Philip pulled out of a gala charity reception with the queen on Monday night after temporarily losing his voice, but attended a service at Westminster Abbey marking the 60th anniversary of her coronation on Tuesday.
The illness was unrelated to Thursday's hospitalisation, according to the palace.
The prince maintains a busy schedule and in April visited Canada for a "private working visit" where he was also presented with insignias of Companion of the Order of Canada and Commander of the Order of Military Merit.
On Wednesday he toured the SS Robin, a Victorian steamship docked in east London.
Philip married Elizabeth Windsor in 1947 and is the longest-serving royal consort in British history.
He has been the queen's constant companion throughout her reign. The monarch said he had "quite simply, been my strength and stay all these years" in a golden wedding anniversary speech in 1997.
Prince Philippos of Greece and Denmark was born on a kitchen table on Corfu on June 10, 1921, the only son of prince Andrew of Greece - the younger brother of Greece's king Constantine - and princess Alice of Battenberg.
He was evacuated on a British Royal Navy ship from politically unstable Greece when just 18 months old before moving to England to attend a preparatory school.
After becoming an outstanding Royal Navy cadet, he served on battleships in the Indian Ocean and the Mediterranean during World War II.
The duke has enjoyed good health for almost all of his life, but has now been hospitalised four times in 18 months.
He pulled out of a jubilee concert in front of Buckingham Palace last June after being taken to King Edward VII hospital suffering from a bladder infection.
The previous Christmas he was taken from the family home at Sandringham, east England, for an operation to have a coronary stent fitted after he suffered chest pains. He remained in hospital for four days.