Roads have been sealed off in Kesgrave in Suffolk after the incident in Friends Walk at around 8.40am today, with a marked police car parked outside nearby Kesgrave High School.
The victim was airlifted to Addenbrooke’s Hospital in Cambridge where he is receiving urgent medical attention, Suffolk Police said.
The force said officers have arrested a teenage boy and he has been taken into custody for questioning.
Kesgrave High School said on Twitter that one of its Year 11 students had been involved in the shooting, but that pupils at the site were safe and would remain there for the normal school day.
Assistant Chief Constable Rob Jones said: “Following this serious incident our priority is to keep everyone safe.
“We have now made an arrest as part of the investigation and are working with our partners in Suffolk and our schools to ensure that everyone feels safe when they are collecting their children from school this afternoon.
“There will be more police officers on patrol and to provide reassurance in the area and I would ask for anyone with information about this incident to come forward.”
A statement, posted by Kesgrave High School on Twitter, said: “We have been made aware by the police that there has been a serious incident involving one of our Year 11 students, on their way to school.
“Students in school are safe and we are managing the situation in constant, close communication with the police.
“Students are to remain in school and will be kept safe in liaison with the police. Police will be present in the area and around the school throughout the school day.
“At the present time we are expecting students to be dismissed at the end of the school day, 3.20, as normal.”
Friends Walk and Through Jollys are cordoned off and there is a partial closure on Ropes Drive.
Essex and Hertfordshire Air Ambulance was called to the scene, but a spokesman could provide no further information about the incident.
The owner of an animal shelter in Kesgrave said a man believed to be the suspect in the shooting had been hiding in his back garden, but escaped before armed police officers arrived.
The resident, who asked not to be named, told the PA news agency the man appeared to be in his mid-20s and “looked like he hadn’t had a haircut for a while”.
“I got woken up because my dogs were going absolutely ballistic at the back of the house.
“When I went to the back window to have a look there was a gentleman who looked like he was carrying something, at first I thought it was a bat or pole or something, and he went down behind my exotic animal enclosures.
He added that the man had a hooded top over his arm concealing whatever he was carrying.
“I’ve got no neighbours directly and I’ve got a woodland at the side… I didn’t see where he went.”