Eyewitnesses said they heard the sound of gunshots
Officers from the Metropolitan Police's Flying Squad were lying in wait outside an HSBC branch in Bournemouth Road, Chandler's Ford near Southampton.
One man died at the scene, the other died later in hospital. It is thought a gang was targeting a Securicor security van outside the bank.
A man was later arrested in the Raynes Park area of south-west London.
The Independent Police Complaints Commission is conducting an inquiry into the deaths.
Deborah Glass, from the commission, said a loaded firearm had been recovered from the scene of the shooting.
"[The loaded firearm] will be subject to forensic tests that will take some time but that is certainly some indication of what the police were dealing with.
"I understand that three shots were fired - from the information so far - all the shots were fired by police officers."
I looked out the window and saw blood everywhere on the floor
Melanie Chase, eyewitness
Witnesses speak of fatal raid
A statement from the Metropolitan Police said: "The object of the operation was to prevent and apprehend those believed to be involved in an attempted armed robbery of a premises in Chandler's Ford.
"At approx 1005 [BST] shots were fired and two men were shot.
"One was pronounced dead at the scene, the other was taken to a local hospital but died at approximately midday. No officers were injured in the incident."
No bystanders were injured either, said Hampshire police.
Third person mystery
Meanwhile, Scotland Yard refused to comment on witness claims that a third robber made a getaway from the scene of the shooting.
However, a spokeswoman from South Central Ambulance Service said three patients had been treated.
The raid is thought to have involved a Securicor van
"We were called around 10am to reports of two people having been shot in Chandler's Ford," she said.
"We treated three patients - one died at the scene, one was taken to hospital with life-threatening injuries and we treated a third patient who suffered minor injuries and did not require hospital treatment."
Earlier, one eyewitness called Juliet said: "I heard three shots.
"As I looked over the balcony edge I could see an unmarked police car and there were four police officers that got out of the car."
'Sound of bullets
Employees at Mann & Co estate agents, just yards from where the shooting happened, rushed out from the back of their offices when they heard the shooting.
One said: "I knew it was the sound of bullets immediately.
"Everyone just ran to get as far away as possible.
"The police must have been tipped off.
"One customer told us they saw police officers running out of the public toilets just near to the bank and then they heard the shots.
"This is out of the ordinary for sleepy Chandler's Ford so we are all a bit shaken."
A spokesman for HSBC, who confirmed no customers or staff were hurt in the incident, said: "We are obviously very grateful because this violent incident appears to have had the potential to have been much worse."
Dos personas murieron a tiros luego de un intento de robo a un banco en Chandler's Ford, cerca de Southampton, Reino Unido. Al menos uno murió y el segundo se cree que pudo haber muerto en su camino al hospital.

Se piensa además que una tercera persona escapó en un Volvo azul, aunque ello no ha sido confirmado, mientras que ningún civil o empleado fue herido.

Los asaltantes al parecer fueron seguidos al sitio como parte de una operación de la Policía Metropolitana, y miembros de la llamada ''Flying Squad'' ("Brigada móvil") les dispararon luego de intentar robar un camión blindado. La IPCC se encuentra investigando el incidente.

El incidente ocurrió en el banco de HSBC en Central Precint, Chandler's Ford, alrededor de las 10:10 hora local (09:10 UTC). Las escuelas locales de la zona fueron cerradas aunque la amenaza al sector sería extremadamente baja, con un gran número de policías en la escena.