A 15-year-old girl convinced a gang of "teenage vigilantes" to lure and kill a lorry driver on the mistaken belief he was a paedophile, a court has heard.
Darren Kelly was stabbed to death near his home in Pitsea, Essex, last October.
Prosecutors said there is no evidence the 42-year-old was a paedophile with detectives finding online conversations where it was suggested he was looking for a partner aged over 45.
Four people including the girl accused of initiating the attack are standing trial at Chelmsford Crown Court where they plead not guilty to murder.
Prosecutor Crispin Aylett told the court the girl had launched a "personal campaign" against paedophiles.
Now 16, she had previously arranged to meet two men she had found online in the hope they would be arrested.
When she spoke to Mr Kelly using the anonymous messaging app Whisper, she had "lost faith" in the police and court system, Mr Aylett said.
Describing the case as being "as disturbing as it is extraordinary", Mr Aylett said there was no evidence Mr Kelly was interested in under-age girls.
"In fact, there is plenty of evidence to suggest precisely the opposite," he said.
"The girl instigated this attack by forming a group of teenage vigilantes in order to attack a 42-year-old man that she had met online.
"She had told the others that the man was a paedophile and as a result he was punched, kicked and then stabbed to death in the street."
After the earlier incidents with two men, aged 23 and 67, whom she met on Facebook, officers asked her why she had arranged to meet them.
The court heard she told officers: "Because they're perverts and I don't think perverts should be around and I don't see anybody else doing anything about it."
Chris Carroll, 20, of Pevensey Close, Pitsea, along with two 17-year-old boys and the girl all deny murder. The teenagers cannot be named for legal reasons.