A man set out to launch a knife attack in Westminster just hours after his mother found weapons in his bedroom and called police, a court has heard.
CCTV captured Khalid Ali, 28, buying a set of three new knives before heading to Whitehall, the Old Bailey was told.
The jury also saw footage of him on alleged “hostile reconnaissance” near Parliament, Downing Street and MI6.
Mr Ali, from Edmonton, north London, denies preparing terrorist acts and possessing explosives abroad.
Prosecutor Brian Altman QC has alleged he made bombs for the Taliban in Afghanistan before returning home to the UK in 2016 to deliver a “message” to Parliament.
Opening the trial, the prosecutor said Mr Ali wanted to launch “a deadly terror attack” against MPs and the police.
It was just weeks after a terror attack when a man had driven at pedestrians on Westminster Bridge and stabbed a police officer to death, he told the court.
‘Police in danger’
The court heard Mr Ali was being followed by surveillance officers in the days before he was held by armed police on 27 April last year.
The prosecutor said Mr Ali’s mother called police in the early hours when she discovered a set of knives and a sharpener in his bedroom. She told officers she was “scared” her son “was going to kill the family”, although she did not want him arrested.
Mr Altman told the court the defendant left the property and later travelled to Ealing in west London where he “set about planning to rearm himself”, buying three kitchen knives in a branch of Wilko.
He took the Tube to central London and CCTV later showed him walking around and dropping a mobile phone in the River Thames, the court heard.
When he was apprehended, the knives were found in his jacket pockets and the waistband of his tracksuit bottoms.
The jury was shown footage from a body-worn camera worn by one of the arresting officers.
Mr Altman said when the officers asked whether members of the public were in danger, the defendant replied “he was not interested in the public”.
An officer then asked if anyone else was in danger, and the defendant replied, “You lot are carrying weapons, so you must know you are in danger”, the prosecutor alleged.
Mr Altman told the jury Mr Ali had used the phone he later dropped into the Thames to search for information about police officers.
“Paying attention to stab vests worn by policemen when your plan is, or at least includes, launching a knife attack on a policeman makes perfect sense, so he could target the unprotected areas of the body,” the prosecutor added.
The trial continues.