Imani Green, from Balham, south London, was shot dead in a cafe in Duncans, Jamaica. Photograph: Mitchum Brown/Handout

An eight-year-old British girl who was shot dead while visiting relatives in a quiet Jamaican town is thought to have been the accidental victim of a violent local feud.

Imani Green, from Balham, south London, was playing with her cousins in a shop in the north coast town of Duncans on Friday night when a gunman burst in and opened fire.

Imani was hit twice – once in the head – and died on the way to hospital. Three people injured in the shooting were also taken to hospital and are thought to be in a stable condition.

Witnesses said an unfamiliar car had pulled up near the general store at about 8.30pm. Seconds later, a masked man walked up to the shop and began shooting. One of Imani's cousins, a teenage girl who did not want to give her name for fear of reprisals, said she had tried to grab her as soon as she realised what was going on.

"A car looked like it was reversing and a guy came and walked in," she said. "When I looked the man just come round and shoot at the place."

Despite a shot tearing past her face, the girl did her best to help Imani. "I looked and realised my little cousin was sat down right here," she said, pointing to the shop's freezer cabinet. "I grabbed her and she'd been shot in the head and she just dropped down." Her cousin's body, she said, had already gone limp.

"I picked her up off the ground and realised she was still breathing. I flagged down a car and they drove us to hospital. The rest is history."

Imani's mother, Donna, is understood to have left her daughter to play with her cousins at the store while she went shopping in the nearby town of Falmouth. She had been due to pick her up on her return, but let Imani play on because she was enjoying spending time with her family.

On Sunday the raw-board shack still bore the scars of the shooting. Among the dominoes, the imported washing powder, packets of biscuits and the bags of corn puffs, at least four bullet holes could be seen: one in the wooden counter; one in the back wall; one in a tin of paint, and one, oddly, behind the fridge – the result, perhaps, of a ricocheting round.

Jamaican police said there were a number of lines of inquiry but they were considering the theory that the shooting was retaliation for an earlier gun attack.

They also said Imani had not been the intended target, and stressed there was no suggestion her family was involved in gang violence.

Imani's cousin, Michael Brady, said the family was struggling to come to terms with what had happened. "We really feel it," he said. "Right now I can't work. I can't go out. I just cry. I just wake up and cry."

Imani, who had sickle cell anaemia and had gone to Jamaica with the blessing of her school in the hope that the warm climate would ease her condition, had been on the island since 27 December and was due to return to London later this month.

Her brother Dean Palmer said the family had been devastated by the death of his sister, whom he described as "an extremely brave girl".

He said Imani went to Jamaica twice a year to help her cope with the disease, adding that although the family had been unsure about taking her this time, she was "back to her normal self" within a few days of arriving on the island.

Anne Wilson, the headteacher of Fircroft primary school in Tooting, where Imani was a pupil, said she was a "happy, playful child" who was popular with staff and children alike.

"She dealt with her illness very bravely and coped well with the special arrangements we had to have in place to support her," Wilson told the BBC.

"She had been given special permission to travel to Jamaica so she could benefit from the warmer climate and we had been in contact with the local primary school she was attending."

Neighbours in south London yesterday spoke of their sorrow at learning that Imani had been killed. One friend of the family, who asked not to be named, said: "This is a closeknit community, so this is going to hurt us."

Another added: "Nobody wants to speak, she was just a little girl. This is all so sad. We're distraught." Neighbours said members of Imani's family had left their home early on Sunday morning to fly to Jamaica to be with her mother.

Sadiq Khan, the shadow justice minister and MP for Tooting, said: "I am devastated to hear the news of eight-year-old schoolgirl Imani Green, a pupil at a Tooting primary school. This is terrible news."

The Foreign Office confirmed the death of a British national in Jamaica on Friday 11 January, and said it was providing consular assistance to the family, while the British honorary consul in Montego Bay described Imani's death as "a desperately sad event", adding that the consulate was doing what it could to help her relatives.

Jamaica's national security minister, Peter Bunting, told the Jamaica Gleaner: "The senseless killing of a young, innocent child must outrage all well-thinking Jamaicans, and cause us to join our security forces in an intensified effort to rid our communities of criminals."