Witnesses have spoken about the moment a gunman opened fire on a car outside a primary school, leaving a 23-year-old man dying in the street.

The shooting in the Ladywood area of Birmingham, near the city centre, left residents feeling “sick” and in shock.

Violence unfolded at about 5pm on Tuesday, yards from the windows of classrooms at St John and St Peter’s C of E academy school, where children had been studying a couple of hours before.

On Wednesday, the school was closed and a blue tent had been erected over what was thought to be the car the victim had been sitting in along with two other men when the attack happened. Another dark sheet could be seen about 20 metres away, where it is thought the victim collapsed.

One woman, who did not want to be named, said another vehicle pulled up by the car, and a succession of shots rang out. She said: “A car came down the road and they had the window down and they started shooting.

“The guy who got killed, he ran as if to jump the wall I was standing in front of. They were firing from the car and they come out the driver’s side.

“It seemed like there was multiple shots, like a pow, pow, pow – a succession of shots. He ran towards the shops, towards the chemist and then he was down.”

She described the three attackers as male and wearing balaclavas, and said the other car appeared to have been struck by at least one bullet.

The witness added she had not slept overnight after what she had seen. “I know him, he was never in trouble, and he always said hello,” she said. “He’s got a very young baby, a few weeks old. I feel so sick.”

Police have said two men, aged 19 and 20, were taken to hospital for treatment. Their injuries were not believed to be life-threatening.

Another woman, who had collected her daughter from the school that afternoon, said she was standing at a nearby bus stop when there was a shout of: “Someone’s been shot.”

The mother, who declined to be named, said: “I took my kids back to the house and then we came running to see.

“He had been shot in his side, from what I saw, and he was lying there by the tree. People came out of the shops to help, and they were trying to stop the blood.”

She added: “Just a few minutes earlier, I had been stood outside Granny’s [takeaway] and talking. I just thank God it happened when the kids were at home. You can imagine that earlier, how many kids were at the chippy.”

A spokesman for All Saints multi-academy trust, which runs the school, said staff would be in touch with parents with further information on when it would be reopening.

West Midlands Police said a postmortem was due to be carried out on the victim, and inquiries were continuing.

There have been no arrests and witnesses are being asked to come forward.

It was the second fatal shooting in Birmingham this year, after 28-year-old Remal Hunt was shot in Erdington on 18 April.