Prince Philip has had a "successful procedure" for his pre-existing heart condition, and will remain in hospital for several more days.
The Duke of Edinburgh, 99, had the procedure on Wednesday, the palace has said.
A Buckingham Palace statement read: "The Duke of Edinburgh yesterday underwent a successful procedure for a pre-existing heart condition at St Bartholomew’s Hospital.
"His Royal Highness will remain in hospital for treatment, rest and recuperation for a number of days."
The duke was originally admitted to King Edward VII Hospital for treatment for an infection more than two weeks ago.
But he was transferred to St Bartholomew's in the City of London on Monday for treatment for a pre-existing heart condition.
His daughter-in-law, Camilla, the Duchess of Cornwall, said on Wednesday that he was "improving" and that the family had their "fingers crossed".
Watch: Prince Philip has 'slightly improved', Camilla says
The palace has previously described the duke as being "comfortable" and "responding to treatment".
The hospital stay, which was made out of an "abundance of precaution" on the advice of the duke's doctor, has become his longest spell, at 16 days.
The duke was last in hospital just before Christmas in 2019, when he was taken in on his doctor's advice as a precaution.
He was there for four days before leaving in time for Christmas at Sandringham.
He had a hip operation in September 2018 at the same hospital and was there for 10 days. It was a planned operation.
In June 2017, he spent three days in the hospital with an infection.
Despite the long spell in hospital, the duke has only had one visitor, when his son Prince Charles made a trip to see him over the first weekend he was in King Edward VII.
However the rules for visitors at St Bartholomew's are much stricter and it's unlikely he will be able to have any other guests while he is there.
Philip, who will turn 100 in June, is known for his no-fuss attitude, and his son Prince Edward said he was "looking forward to getting out".
Giving a brief update on his condition on 23 February, he told Sky News: "As far as I'm aware, well I did speak to him the other day, so he's a lot better thank you very much indeed, and he's looking forward to getting out, which is the most positive thing."
Asked if Prince Philip, who is the longest serving consort, was frustrated in hospital, Edward said: "Just a bit! I think that gets to all of us, and then, you can only watch the clock so many times and the walls are only so interesting."
Philip has been living at Windsor Castle with the Queen for the majority of the lockdowns in the UK and England, a change from his usual retirement residence of Sandringham.
The Queen, 94, has been continuing with her work despite her husband's long hospital stay, including taking calls with Rishi Sunak, the Chancellor of the Exchequer, before the budget.
Watch: Queen's husband Prince Philip moved to undergo heart tests