Lewis Dunne, 16, was shot in the back in Eldonian Village, Vauxhall, Liverpool, in November 2015.
Jake Culshaw, 25, of no fixed address, and brothers John and Paul Martin, aged 20 and 25, of Walton, all deny murder.
A jury heard the accused men had been involved in violent clashes with another group before Lewis was killed.
The teenager had left his home to buy cigarettes when he was shot, Liverpool Crown Court heard.
Described as "a quiet lad who kept himself to himself", he had earlier been enjoying a "perfectly ordinary evening" sharing a Chinese takeaway and watching television with his family.
Ian Unsworth QC, prosecuting, told how a witness said one of the men in the rival group had curly hair sticking out of his baseball cap.
Lewis too, had noticeably curly hair, he added.
Mr Unsworth said the accused were among a group of men who were intent on revenge for what had happened earlier.
He told the jury it was a "truly cowardly attack."
Lewis was shot in the back as he walked under a bridge along a canal towpath, before four men were seen on CCTV running from the scene, the jury was told.
He was "simply in the wrong place at the wrong time" and suffered "catastrophic injuries" from the shooting.
The fourth man allegedly involved in the killing has not been traced.
Mr Unsworth said Jake Culshaw later told people he had carried out the shooting and referred to the gun used being thrown in the water, as well as his mobile telephone.
The court was told the defendant's phone has not been traced and parts of a shotgun, which is said to be the murder weapon, were recovered from the Leeds and Liverpool Canal in January.
Mr Unsworth said: "Each of the three defendants bears the responsibility...that we cannot say which person actually shot him does not matter.
"Whether he looked like looked like one of the opposing group or whether they simply believed he was one of them, they used the gun to shoot him dead as he walked unwittingly into their path."
The trial, expected to last between four and six weeks, continues.
A teenager was shot dead in what may have been a case of mistaken identity after his alleged killers sought revenge on a rival, a court heard.