Thusha Kamaleswaran was the victim of “needless posturing” by two rival gangs, the Old Bailey was told.
Kamaleswaran was playing with her siblings in March last year in the Stockwell Food and Wine shop, owned by members of her family, when attackers in hoods and masks chased a youth inside and opened fire.
The attackers were aiming for Roshaun Bryan, who they believed to be a member of a rival gang.
The three men fled, leaving the girl and the shopper critically injured, while their target remained unhurt, the court heard.
Kamaleswaran was saved by medical staff who operated at the scene and later in hospital, even though her heart stopped twice. But she has been left paralysed for life.
Shopper Roshan Selvakumar, 35, was shot in the face and has bullet fragments lodged in his neck and head that are too dangerous to remove.
Prosecuting QC, Edward Brown said: “[Selvakumar] did not suffer lasting effects despite the location of the gunshot wound. Given its location, had it been centimetres to one side he surely would have lost his life.
“The reality of the shooting may be that while there was an intention to kill the suspected rival gang member, the gunman and his accomplices could not have cared less if someone else was shot too.”
He added that Kamaleswaran was “remarkably lucky” to survive.
The gunman is alleged to be 21-year-old Nathaniel Grant who – along with Kazeem Kolawole and Anthony McCalla, both 19 – denies attempted murder and grievous bodily harm with intent.