The Metropolitan Police has said the force is grateful to the Duke of York for his understanding after he was challenged by officers in the gardens of Buckingham Palace.
Prince Andrew was asked to confirm his identity after a break-in at the Palace 48 hours earlier.
– Metropolitan Police statement
In light of media reports we can confirm that the man spoken to by officers was the Duke of York. We are making this public with HRH's permission.
We are grateful to the Duke for his understanding and have apologised for any inconvenience caused.
An earlier statement had only confirmed a man was ordered to verify his identity by two officers in the palace's gardens at around 6pm on Wednesday.
The Duke of York has said he is "grateful" for an apology from police after officers challenged him in the gardens of Buckingham Palace less than 48 hours after a break-in at the Queen's home.
The Met Police confirmed that a man was ordered to verify his identity by two officers at around 6pm on Wednesday.
Prince Andrew said in a statement today: "The police have a difficult job to do balancing security for the Royal Family and deterring intruders, and sometimes they get it wrong."I am grateful for their apology and look forward to a safe walk in the garden in the future."
The Metropolitan Police have denied a report that claimed Prince Andrew was held at gunpoint by armed police while being challenged by officers at Buckingham Palace.
The Sunday Express has reported the 53-year-old was ordered "put your hands up and get on the ground" during a brief stand-off.
But a statement from the Met fails to corroborate the account, instead saying:
– Spokesman for the Metropolitan Police
On Wednesday, 4 September at approximately 1800hrs two uniformed officers approached a man in the gardens of Buckingham Palace to verify his identity.
The man was satisfactorily identified. No weapons were drawn and no force was used.
The Duke of York was challenged by police at Buckingham Palace less than 48 hours after a break-in at the Queen's London residence.
The Metropolitan Police confirmed a man was ordered to verify his identity by two officers in the palace's gardens at around 6pm on Wednesday.
The confrontation came after an intruder had scaled a fence and got inside the palace on Monday night, before being arrested by police.
Buckingham Palace has not commented on the break-in, which is one of the most serious security breaches at the Queen's London residence in more than 30 years.
The most notorious came in 1982 when father-of-four Michael Fagan evaded guards to reach the Queen in her bedroom.
Her Majesty talked to the 31-year-old for around 10 minutes after he climbed over the palace walls and up a drainpipe.
She then managed to alert a footman, who held him down until police arrived.
Security measures will be reviewed as part of an investigation into a break-in at Buckingham Palace, the Metropolitan Police have confirmed.
"A review of the specific circumstances of this incident is being carried out," a spokesman confirmed. "No members of the Royal Family were at Buckingham Palace at the time of the incident."
Two men have been arrested and bailed following the break-in on Monday evening.
Scotland Yard has confirmed two men were arrested "following an incident in the vicinity of Buckingham Palace" on Monday evening in a statement to The Sun.
– Scotland Yard spokesperson
Police arrested two men following an incident in the vicinity of Buckingham Palace at approximately 22.20 hours on Monday, 2 September.
Both men have been bailed to return to a central London police station and enquiries continue.
A review of the specific circumstances of this incident has been carried out.
Two men have been arrested following an alleged break-in at Buckingham Palace earlier this week, The Sun has reported.
The newspaper claims one of the suspected burglars scaled a 12ft fence and kicked open a door to gain entry into the Palace last Monday evening.
He was reportedly discovered in one of the state rooms, while a second suspect was reportedly held outside the Palace.
The newspaper said the alleged intruder was arrested on suspicion of burglary, tresspass and criminal damage to a door, while the other man was arrested on suspicion of conspiracy to burgle.