The police officer who shot Mark Duggan said he saw him holding a handgun and believed he was going to shoot, an inquest has heard.
The officer, identified only as V53, said Mr Duggan held the gun at hip level and "crossed a line in the sand".
V53, who had been carrying an MP5 sub-machine gun and a 9mm Glock pistol, said he had been in "hard stops" before but had never had cause to shoot.
Mr Duggan, 29, was shot in Tottenham in 2011, sparking riots across England.
V53 told the Royal Courts of Justice that he was travelling as part of an undercover police convoy and received confirmation that Mr Duggan was armed.
He said the police used "two tones" to bring the minicab Mr Duggan was travelling in to a stop. He then revealed police badges on his clothes, as well as shouting "armed police".
In Monday's evidence, the minicab driver denied hearing any instructions or seeing any police identification.
V53 said he saw Mr Duggan jump out of the minicab and shouted for him to stand still.
Describing it as a "freeze-frame moment", he said Mr Duggan turned towards him holding a handgun with his forearm parallel to the ground, pointing left across his body.
He said: "The only tunnel vision I had was his right hand and the gun in his hand."
The officer said he "brought [his] weapon up and discharged one round".
"The round has impacted Mr Duggan on the right chest," he said.
He added that Mr Duggan then "flinched away and the gun was then pointing towards me".
"I'm thinking 'he's gonna shoot me' so fired a second round into [his] arm."
V53 said that after the shooting, Mr Duggan had a "sucking chest wound" and was breathing for about two minutes before becoming unresponsive.
The officer said he performed CPR and chest compressions until a female paramedic arrived. He said he then looked for the gun he had seen Mr Duggan holding.
He said he could not find it, adding that it had "disappeared". A weapon was later found behind a wall.
Asked whether Mr Duggan had moved towards him before he fired the gun, V53 replied: "I don't remember him taking any steps towards me," before adding, "I was absolutely sure that Mark Duggan never fired a shot"
The court was shown a mannequin to demonstrate where Mr Duggan was wounded. It showed that one shot went horizontally through his bicep and another diagonally down through the chest.
Barrister Leslie Thomas, who is representing the Duggan family, suggested that V53 shot Mr Duggan in the gun-holding arm first - and so could not have remained a threat before the second shot in the chest.
But V53 replied several times that he shot Mr Duggan in the chest first, in accordance with training, and the man fell backwards after he shot him, despite Mr Thomas suggesting he fell forward.
He told the hearing: "It's 804 days since this happened. I am 100% sure he was in possession of a gun at shot one and shot two."
In one of several earlier statements V53 made to the police, he said: "It's a day I'll never forget... and hopefully will never ever happen again."
He added: "The Duggan family didn't start the riots, I didn't start the riots."
During the incident V53's colleague, W42 was shot, but not seriously injured.
The marksman, who joined the Metropolitan Police in 1997, is testifying in a courtroom closed to members of the public and the press. An audio feed of his voice was relayed to a separate room.
The inquest continues.