Image copyright James West Image caption Khalid Masood drove his hire car into pedestrians before crashing it into the railings around Parliament

Security at the Palace of Westminster "completely failed" the unarmed police officer killed in the terror attack on its grounds, an inquest has heard.

Khalid Masood stabbed PC Keith Palmer to death on 22 March 2017 in New Palace Yard, after mowing down and killing four pedestrians on Westminster Bridge.

The latest instructions for armed officers told them to focus on the gate where PC Palmer was stationed.

But the Old Bailey inquest heard this system had "not functioned for years".

PC Lee Ashby - one of two authorised firearms officers (AFOs) on duty in the yard at the time of the attack - said he would have fired at Masood if he had had a clear shot from a fixed post at the gate.

Instead, he and his colleague PC Nicholas Sanders were positioned at the other side of the yard where they could not see or hear the carnage unfolding, and no AFOs had been near the gates for almost an hour.

It meant Masood was able to run from his car towards the Houses of Parliament, where he was confronted by PC Palmer.

After stabbing the officer to death, Masood was shot and killed by armed police.

PC Ashby, an experienced marksman, accepted it was not possible to provide effective cover for the gates on his patrol and agreed the system left unarmed officers unprotected at the entrance "more often than not".

He said an opportunity to save PC Palmer's life had "possibly" been lost.

PC Ashby said he was responsible for patrolling "sector three" of the courtyard, which included the Members' Entrance, Carriage Gates and College Green.

The court heard that the most recent instructions for New Palace Yard dated from 2015 and ordered them to focus on the Carriage Gates.

But PC Ashby told the Old Bailey he had never seen the up-to-date "post instructions" for where to be stationed and that officers worked from a map posted on a wall that dated from 2012.

An email chain, which included the chief inspector of operations for the palace, Nick Aldworth, revealed concerns had been raised over the positioning of armed officers as early as February 2015.

PC Ashby said he was unaware of the guidance and instead followed instructions given by his sergeants in daily briefings.

The lawyer representing PC Palmer's widow Michelle, Dominic Adamson, said: "The system of security at the Palace of Westminster completely failed to protect PC Palmer on that day?"

PC Ashby said: "It would seem so, sir."

The barrister continued: "Because it had not functioned for years?"

"Based on the sector three map, which I was responsible for, yes," the officer replied.

PC Ashby and his colleague PC Nicholas Sanders faced a misconduct investigation after the attack but no formal action was taken.

The investigation highlighted "poor practice" from a "misjudged interpretation" of what they were allowed to do on patrol, but said "this practice was not unique to these officers".

Mr Adamson suggested it was an "extraordinary situation" where armed officers "had no idea what they were supposed to be doing" and that "lax" security arrangements had persisted for years.

"The sector area, sector three, was too big, too large for two officers," PC Ashby replied.

'Devastating injuries'

Earlier, the inquest heard from pathologists on how the victims from the bridge had been killed.

Kurt Cochran, 54, Leslie Rhodes, 75, Aysha Frade, 44, and Andreea Cristea, 31, were all hit by Masood's car.

Consultant pathologist Ashley Fegan-Earl told the inquest the vehicle was as "lethal as a knife or a gun" and caused them "unsurvivable" injuries.

Ms Cristea, an interior designer from Romania, was thrown 10ft into the air after being hit by the car, then fell 41ft into the River Thames below.

She had been lying face down and unconscious in the water for five minutes before being pulled out and died in hospital two weeks later.

Mr Fegan-Earl said her head injuries were "highly likely" to have killed her, even if she had not gone into the water.

Asked if she might have survived if she had been lifted out of the water sooner by the crew of a tourist boat, he answered: "I suspect not."

Image copyright Met Police/Social Media Image caption Clockwise from top left - PC Keith Palmer, Aysha Frade, Leslie Rhodes, Andreea Cristea and Kurt Cochran all lost their lives

American tourist Mr Cochran pushed his wife Melissa out of the way moments before he was hit and fell head-first over a railing and onto the pavement, the court heard.

He suffered multiple bruises, fractures and brain injuries and his "survival period would have been brief", said pathologist Dr Simon Poole.

A lawyer for Mr Cochran's sister asked why medics had not given him chest compressions at the scene, and whether it could have made a difference.

Dr Poole said: "I don't think so."

He added that the seriousness of Mr Cochran's head injuries were "unsurvivable".

'No issue with medical treatment'

The inquest heard Mr Rhodes also suffered a "devastating" head injury when he was struck by the car, before being thrown onto the road.

He was taken to King's College Hospital in London but died around 24 hours later.

Dr Fegan-Earl said: "The injury was devastating, unsurvivable and, in my opinion, it would have rendered him deeply unconscious straight away.

"There was no issue with the medical treatment he received and the formal cause of death was given as head injury."

Asked if Mr Rhodes could have survived if he had been transported by air ambulance, he replied, "In my opinion, no."

Ms Frade's death "would have been near instantaneous and in my opinion without suffering" when she was struck from behind, thrown into the air and under the wheels of a double-decker bus, said Dr Fegan-Earl.

He said she suffered a "devastating, unsurvivable head injury", as well as "devastating internal injuries" and fractures to her lower limbs.

She would have been rendered unconscious immediately when she was hit, he added.