A man accused of driving a van into a crowd of people near two mosques in north London wanted to kill as many Muslims as possible, a court has heard.
Darren Osborne, 48, is accused of driving into a crowd of worshippers in Finsbury Park, killing Makram Ali, 51, and injuring nine others last year.
He targeted the crowd because they were Muslims, having grown angry at rising terrorism, Woolwich Crown Court heard.
Mr Osborne from Cardiff, denies charges of murder and attempted murder.
Opening the trial, prosecutor Jonathan Rees QC said Mr Osborne had driven a Luton box van from Cardiff to London the day before the alleged attack.
He then deliberately targeted crowds in Finsbury Park at about 00:15 BST on 19 June, he added.
The area was busy with worshippers attending Ramadan night prayers at the time, Mr Rees told the court.
Mr Osborne was seeking “to kill someone merely because of their religion”, he added.
Mr Rees told the court the alleged attack was “particularly horrific” because the group Mr Osborne is accused of driving into had gathered in the street to help Mr Ali, who had collapsed minutes earlier.
A handwritten note, found in the van, complained about terrorists on the streets and the Rotherham child exploitation scandal, Mr Rees said.
The note allegedly referred to Muslim people as “feral” and called Muslim men “rapists” who were “preying on our children”, the jury heard.
One part read: “Don’t people get it, this is happening up and down our Green and pleasant land.
“Ferrel [feral] inbred raping muslim men hunting in packs preying on our children, this will be coming to a town near you soon, it most probably has, get back to the desert, you raping inbred bastards & climb back on ya camels.”
The note ended: “Well Folkes gotta go busy day today. Remember peaceful vigils only & please dont look back in anger, God Save the Queen.”
It also branded Labour leader Jeremy Corbyn a “terrorist sympathiser” and attacked London Mayor Sadiq Khan and singer Lily Allen, the prosecutor added.
Mr Rees said: “The underlying theme seems to be that the defendant felt that insufficient was being said or done to counter terrorism and the grooming gangs comprising predominantly Muslim males.
“Against that background, the defendant decided to take matters into his own hands.”
Mr Osborne planned to make “a public statement by killing Muslims”, knowing that his handwritten note would be recovered, Mr Rees added.
Although Mr Osborne was not charged with a terrorist offence, Mr Rees said “the note and the comments he made after his detention establish that this act of extreme violence was, indeed, an act of terrorism”.
Mr Osborne’s partner, Sarah Andrews, had described him as a “loner and a functioning alcoholic” with an “unpredictable temperament”, Mr Rees added.
He had become “obsessed” with Muslims in the weeks leading up to the incident after watching BBC drama Three Girls, about the Rochdale grooming scandal, Ms Andrews had said.
Ms Andrews said he became a “ticking time-bomb” before the alleged attack, Mr Rees added.
During the weekend prior to the attack, the defendant was heard “preaching racial hatred” in a pub, he said.
He allegedly told a soldier in the pub: “I’m going to kill all the Muslims, Muslims are all terrorists. Your families are all going to be Muslim. I’m going to take it into my own hands.”