The Duke of Edinburgh has been admitted to hospital for an exploratory operation on his abdomen, Buckingham Palace said.
Philip is expected to remain at the London Clinic for up to two weeks.
The Palace said in a statement: "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. Further updates will be issued when appropriate."
Philip's admission to hospital came shortly after he attended a Buckingham Palace garden party. A spokeswoman said: "He is in very good health." The operation will take place on Friday, following the investigations that were carried out over the past week.
The Duke, who turns 92 on June 10, had missed an engagement at the palace on Monday night because he was feeling "under the weather".
The Prince's illness earlier this week is not thought to be connected to the admission to hospital. The spokeswoman added: "He felt unwell on Monday and missed an engagement but that was down to the fact he had temporarily lost his voice."
The Queen will still perform her engagements as planned on Friday, which include a visit to the new BBC studios in central London.
The Queen and Prince Philip had appeared together on the steps of Buckingham Palace earlier at the start of the garden party. Despite the fierce sun, the Duke appeared relaxed and happily chatted to guests as he walked around. Lord-Lieutenant of Nottinghamshire Sir John Peace attended the garden party and said Philip had been "telling jokes".
Prime Minister David Cameron sent Philip his good wishes, writing on Twitter: "My best wishes to the Duke of Edinburgh who is in hospital tonight. I hope he has a swift recovery."
Tonight police officers stood guard outside the central London hospital where Philip is to undergo the operation. It will be done under general anaesthetic "as any operation of this kind would be", the Buckingham Palace spokeswoman said.