A man accused of carrying out the Finsbury Park attack "decided to take matters into his own hands" after growing angry at a rise in terrorism and the Rotherham child sex scandal, a court has heard.
Darren Osborne, of Glyn Rhosyn in Cardiff, allegedly mowed down Makram Ali, 51, and nine other people on a crowded pavement in north London shortly after 12.15am on June 19 last year.
The 48-year-old, described by his partner as a "loner and functioning alcoholic", had become obsessed with Muslims in the weeks before the attack and accused them all of being rapists and belonging to paedophile gangs, the jury at Woolwich Crown Court was told.
Opening the trial on Monday, prosecutor Jonathan Rees QC said the scene of the attack, near two mosques, was busy with worshippers attending Ramadan night prayers.
Mr Rees said it is alleged Osborne "was trying to kill as many of the group as possible" as he deliberately drove a van into them.
He told the jury: "In the event, he killed one person, a 51-year-old man called Makram Ali, and in addition he injured many others, some of them seriously."
Osborne is charged with the murder of Mr Ali and attempted murder of "persons at the junction of Seven Sisters Road and Whadcoat Street, London", which he denies.
Bystanders had rushed to the aid of Mr Ali moments earlier after he collapsed, and witnesses said he was conscious before being struck by the van, the court heard.
Mr Rees said the "act of extreme violence" was considered by the prosecution to be a terrorist attack.
"That was the motivation behind it, designed to influence Government and intimidate the Muslim community, and done for the purpose of advancing a political, religious, ideological or racial cause," he told the court.
A handwritten note - which complained about terrorists on the streets and the Rotherham child exploitation scandal, and branded Labour leader Jeremy Corbyn a "terrorist sympathiser" - was found in the cab of the van after the attack, Mr Rees said.
The letter, which also attacked London mayor Sadiq Khan as a "disgrace", read: "This is happening up and down our green and pleasant land. Feral inbred, raping Muslim men, hunting in packs, preying on our children.
"Get back to the desert you raping inbred bastards and climb back onto your camels."
Mr Rees told the jury: "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. He planned to make a public statement by killing Muslims, knowing that his handwritten note would be recovered by the authorities."
The court heard how Osborne's partner, Sarah Andrews, had described him as a "loner and a functioning alcoholic" with an "unpredictable temperament".
The defendant had become "obsessed" with Muslims in the weeks leading up to the incident after watching the BBC drama Three Girls, based on the true stories of victims of the Rochdale grooming gangs, she said.
It appeared to Ms Andrews that he was becoming "brainwashed" and - with the benefit of hindsight - she described him a "ticking time-bomb", Mr Rees said.
Mr Ali's family were in court as CCTV footage was played to the jury, showing him collapsing shortly before a van drives in the group who had flocked to his aid.
A white van is seen turning sharply off the road, mounting the curb and ploughing into the group of people some of whom later spill on to the adjacent bus lane as they attempt to pin down the driver.
The defendant had driven from Cardiff to London the previous day, originally intending to drive the van into people taking part in the Al Quds Day march, but began looking for another target when this did not prove viable, the court heard.
A number of men tried to prevent the driver's escape and keep him pinned to the ground as he was heard to say, "I want to kill more Muslims", Mr Rees said.
Another man in the group remembered the defendant - who was "constantly smiling" - saying: "I've done my job, you can kill me now", he said.