"The duke is expected to remain in hospital for continuing treatment for a number of days."
Buckingham Palace said the duke, the nation's longest-serving consort, had the procedure for his pre-existing heart condition at St Bartholomew's Hospital in London.
He returned to King Edward VII's hospital in central London on March 5 to continue his recovery.
The palace said the 99-year-old duke would remain in hospital for "treatment, rest and recuperation".
Concern will be heightened for the duke because of his advanced age, with the Duchess of Cornwall saying on March 3 that Prince Philip was "slightly improving" and adding: "We'll keep our fingers crossed."
The duke has been treated for heart problems in the past and in 2011 was rushed to hospital by helicopter from Sandringham after suffering chest pains as the royal family were preparing for Christmas.
In the serious health scare, he was treated for a blocked coronary artery at Papworth Hospital in Cambridgeshire and underwent a minimally invasive procedure of coronary stenting.
St Bartholomew's is home to Barts Heart Centre - Europe's largest specialised cardiovascular service.
The palace declined to give details of the exact surgery.
The duke is patron of the British Heart Foundation (BHF) which sent its best wishes, saying the duke had been a "long-term advocate for heart research".
Prince Philip was initially admitted to the private King Edward VII's Hospital in central London on February 16 after feeling unwell, before being moved by ambulance to St Bartholomew's on March 1.
He has now spent nearly a month in hospital - his longest-ever stay.
Buckingham Palace said in a statement the day after his surgery: "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."
Prince Philip was visited in King Edward VII's Hospital on February 20 by his eldest son, the Prince of Wales, who made a 200-mile round trip and stayed for around 30 minutes.
The duke spent most of lockdown at Windsor Castle with the Queen for their safety, alongside a reduced household of staff dubbed HMS Bubble.
The couple, who have been married for 73 years, received their first Covid-19 jabs in January.
Timeline on duke's longest-ever hospital stay
Tuesday, Feb 16, 2021
The duke is admitted to King Edward VII's Hospital on a precautionary basis after feeling unwell. He travels from Windsor Castle by car. Prince Philip is said to be in "good spirits" and walks into the private hospital unaided. He is expected to stay for a few days.
Friday, Feb 19
Sources say Prince Philip is expected to remain in hospital for "observation and rest" over the weekend and into the next week.
Saturday, Feb 20
The Prince of Wales makes a 200-mile round trip to see his father, spending around half an hour at the hospital. He appears tearful as he leaves.
Tuesday, Feb 23
Seven days after the duke was admitted, the palace says he is being treated for an infection and is "comfortable and responding to treatment", but is not expected to leave hospital for several more days. The Earl of Wessex says the duke is a "lot better" and looking forward to getting out.
Monday, Mar 1
Prince Philip is transferred in an ambulance to St Bartholomew's Hospital for treatment for an infection and testing and observation for a pre-existing heart condition, Buckingham Palace says. The duke is shielded from public view by large umbrellas as he leaves King Edward VII's Hospital.
Tuesday, Mar 2
The Queen continues with her official duties by holding calls with the Chancellor and the head of the British Army.
Wednesday, Mar 3
Prince Philip undergoes surgery on his heart. The Duchess of Cornwall says of her father-in-law: "We heard today that he's slightly improving. So, that's very good news. We'll keep our fingers crossed."
Thursday, Mar 4
Buckingham Palace announces the duke has had a "successful procedure" for a pre-existing heart condition at St Bartholomew's Hospital. The palace adds: "His Royal Highness will remain in hospital for treatment, rest and recuperation for a number of days."
Friday, Mar 5
Buckingham Palace said: "Following The Duke of Edinburgh's successful procedure at St Bartholomew's Hospital on Wednesday, His Royal Highness has been transferred to King Edward VII's Hospital this morning. The duke is expected to remain in hospital for continuing treatment for a number of days."