A wanted criminal pointed a gun in the face of a man and pulled the trigger as he tried to escape from police.
Members of the public flooded police with 999 calls as plainclothes officers chased the suspect in West Hampstead, north west London.
Witnesses said the man threatened three policemen with a handgun as he was pursued along a busy shopping street.
He then pointed it in the face of a motorcyclist and pulled the trigger three times as he tried to steal his moped.
The confrontation provoked a struggle involving several other members of the public and the man ran off.
Ballistic tests were under way today to find out why the weapon did not fire.
The chase began at around 3pm yesterday when officers from a specialist Brent unit spotted a man wanted for violent offences.
When they stopped his grey Vauxhall Astra in West End Lane, the suspect and second man ran off on foot. One of the men pulled out a gun and pointed it at the officers.
The officers gave chase as the suspect crossed a railway line near West Hampstead tube station and attempted to steal the moped in Sheriff Road.
The suspect was eventually arrested after he was found hiding beneath a car by armed officers a short distance away in the Hemstal Road area.
The second man was held a short distance from West Hampstead tube station.
Police said the moped rider was unhurt but had been left deeply shocked and is receiving support.
Two men aged 30 and 47 were being questioned by detectives today at a north London police station.
Armed police recovered a bag containing three guns. A quantity of diamonds wrapped in paper were found in the pocket of one of the men.
Investigators believe the diamonds may have been stripped from stolen jewellery and were about to be sold.
Detective Inspector Mick Millar, of the Met's Trident team, said: "This was a serious incident in which officers and a member of the public were threatened with firearms in broad daylight in a very busy area of north London.
"This incident could easily have resulted in somebody being shot and seriously injured if not killed.
"We would therefore like anyone who may have witnessed this incident (to come forward), particularly a female resident who approached uniformed officers and may have information which will be able to assist the investigation."
Brent borough commander Mark Toland said: "It is incidents such as this which shows the professionalism of Brent officers.
"I would also like to pay tribute to members of the public who continually called police to inform them of where the suspects were during the chase and to those brave individuals who attempted to detain the suspects."
* Anyone with information should call the incident room on 0208 733 4774 or Crimestoppers anonymously on 0800 555 111.Reuse content