The Westminster Bridge attacker ignored several verbal warnings from firearms officers and continued charging towards them before he was shot, an inquest has heard.

CCTV footage played in court showed Khalid Masood moving quickly towards armed close protection officers with two large kitchen knives. The two close protection officers who were at the scene, who gave evidence anonymously, described Masood as a man with a clear intention to injure or kill.

Masood, 52, from Kent, killed five people on 22 March last year in an attack lasting 82 seconds. He first drove his car into pedestrians on Westminster Bridge in central London, killing Kurt Cochran, 54, Leslie Rhodes, 75, Aysha Frade, 44, and Andreea Cristea, 31, before crashing into a barrier at the Palace of Westminster. He then jumped out of the vehicle and ran towards the gates of parliament, where he fatally stabbed PC Keith Palmer.

The officer who shot Masood, known only as SA 74 , said he initially heard a very loud noise. He told the inquest at the Old Bailey: “I’d describe it as an explosion or similar, which was directly in front of me, towards Westminster Bridge. I had no idea what had taken place at the time. I couldn’t clearly see, I then became aware of lot of incredibly loud screaming, people shouting.”

He said a “significant number” of people were coming towards him, running away from the Palace of Westminster’s Carriage Gates. He started jogging towards the gates. He saw uniformed police officers with batons drawn, moving towards him and trying to get away from someone. “I simply didn’t know what was happening, but I was now certain that something terrible was happening,” he said.

CCTV footage showed SA 74 head towards Masood before moving backwards in an attempt to give the attacker a chance to stop before opening fire. The officer wept while giving his testimony.

“I shouted at him to drop the knife,” he told the court, adding: “It had no effect.” Masood continued moving towards him. “He was going to kill me,” he said. SA 74 then fired several shots.

The other officer to give evidence, known only as SB 73, told the inquest he first saw unarmed police officers running towards them through Carriage Gates, and then saw the attacker. “He was moving at a pace, he was coming towards us,” he told the court. “My immediate thought was he had obviously used force to get through those gates.”

SB 73 said he shouted warnings at the attacker, and Masood did not change direction or speed but carried on towards them. When asked if Masood responded in any way, the officer answered no. He told the inquest he had hoped Masood would stop and did not want to use deadly force. When asked if he could think of a greater justification for having to fire, the officer said: “No, sir.”

Both protection officers quickly carried out first aid on Masood after he was shot. SB 73 administered CPR while waiting for a defibrillator to arrive. He told the court: “At that time he was still breathing. His chest was still rising and falling. He was going grey … He basically stopped breathing so I started CPR – chest compressions.”

The first defibrillator was faulty and the officer continued to provide CPR until a second was provided.

Simon Poole, a pathologist, told the inquest three gunshot wounds were found at autopsy. The first bullet, which struck the upper torso, was believed to be the cause of death.

A statement by Jeeves Wijesuriya, a junior doctor, was read out in court. He was the first medical professional on the scene. “I felt isolated,” he wrote. “I had no medical equipment. I didn’t know what I was running into.”

He first provided aid to Palmer. Unable to detect a pulse, he checked the oxygen was on high flow before he moved his attention to Masood, who he found also did not have a pulse.

He was joined by three paramedics and by senior doctors from the air ambulance service. Masood was taken to St Mary’s hospital in Paddington, where he was pronounced dead on arrival at 3.35pm.

The inquest into Masood’s death opened last week. The jury was told that nobody was on trial and there was “no question of attributing blame”. It is expected to conclude at the end of the week.