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.