An alleged terrorist drove at cyclists and police outside the Houses of Parliament in a “premeditated and deliberate” attack designed to cause maximum carnage, a court has heard.

Salih Khater, 30, allegedly steered his car at members of the public before swerving towards police officers and crashing into a security barrier on August 14 last year.

Prosecutor Alison Morgan QC told the Old Bailey that Khater intended to “kill as many people as possible”.

Opening his trial, she said: “On August 14 2018, Salih Khater carried out a premeditated and deliberate attack on civilians and police officers in Parliament Square.

“His weapon was not a gun or a knife but his car.

“First, he drove at cyclists waiting at traffic lights. Then he drove at police officers who were guarding the side entrance to the Palace of Westminster.

“His actions were not a mistake or as a result of some kind of mechanical error to his vehicle.

“They were deliberate and designed to cause maximum death and injury.”

She added: “He caused widespread fear and chaos but miraculously, and contrary to his intentions, he did not kill anyone that day.

“Those who were faced with a vehicle being driven at them at high velocity somehow, and largely by their quick responses, managed to avoid death or very serious injury.”

Ms Morgan told jurors Khater’s reason for the attack was unclear.

But she suggested that by targeting officers guarding the Palace of Westminster the defendant had a “terrorist motive”.

She added: “Using his car in the way that he did, driving in the manner and direction he did, the prosecution alleged that it is obvious that he intended to kill as many people as possible.”

Jurors were shown CCTV footage of the defendant’s silver Ford Fiesta driving at cyclists before crashing into barriers as two uniformed police officers dived out of the way.

The court heard how Khater was born in Sudan and was granted asylum in Britain in 2010, after claiming he had been tortured over his association with a political group called the Justice and Equality Movement.

In the months before the attack, the defendant’s mood changed and he showed signs of “paranoia” about British authorities, it was claimed.

He had failed his accountancy exams at the University of Coventry and his work as a security guard had dried up, it was said.

On May 24 last year, he emailed Labour leader Jeremy Corbyn to express concern about an “event” involving the intelligence service, saying he was going to complain to police as well, the court heard.

Ms Morgan said: “There is no record of any such complaint being made. The response from a Labour Party representative was understandably vague.”

The court heard the email response thanked Khater for his email to Mr Corbyn and stated: “We are sorry to hear about your personal issue.”

The day before the attack, Khater had travelled to Peterborough and unsuccessfully applied for a fast-track UK passport, the court heard.

He then set off from Birmingham to London just before 10pm, arriving after midnight.

Evidence from his mobile phone showed he had looked up maps for 10 Downing Street and Westminster on the internet as potential “deliberate targets”, jurors were told.

CCTV captured Khater arriving in Parliament Square just before 1am and driving around Westminster, allegedly checking the layout for the attack five of six hours later.

Khater then parked up and rested for four-and-a-half hours in Windmill Street in Soho before returning to Parliament Square for further reconnaissance, it was claimed.

He allegedly went on to do four laps of the square before launching the rush hour attack.

Pedestrian Paul Brown was crossing the road when Khater’s car “came out of nowhere” and hit him, causing bruising and grazes, the court heard.

Cyclists Krystof Tokarski and Anya Breen were making their way to work and were waiting at traffic lights when Khater revved his engine and knocked them down, jurors were told.

Mr Tokarski suffered grazes and a broken little finger while Ms Breen was thrown over the bonnet, fracturing her collar bone.

Other people were trapped under their bikes, with some screaming in pain, jurors were told.

The defendant made a sharp turn into a slip road, going 32mph, forcing Pc Darren Shotton and Pc Simon Short to dive out of the way, jurors were told.

As armed police removed Khater from the car, the defendant confirmed he was acting alone, the court heard.

He was spoken to by police at the scene but gave no explanation or apology nor showed any concern for the cyclists nearby, jurors heard.

Ms Morgan said: “The defendant embarked on a calculated and targeted attack in which he intended to kill vulnerable members of the public and police officers, in each case using his car as a lethal weapon to knock them down at accelerating speed.

“The defendant selected an iconic site. This was no coincidence. It is a location of national importance, one that had been subjected to terrorist attacks in very recent history.”

The Sudanese-born defendant, of Highgate Street, Birmingham, has denied two counts of attempted murder and two alternative charges of attempting to cause grievous bodily harm.