A man ran into a primary school to escape shots being fired from a car outside the building.
Two shots were fired at the man, who was on a bicycle outside St Edmund's RC Primary School and Nursery in Springhill, Birmingham.
The man later fled and the school was locked "to maintain the safety of everyone", said police.
A staff member's car was damaged but no-one was hurt. Police said the shooting appeared to be targeted.
Officers were at the school on Thursday to reassure people.
"It is not believed that the school or any of the children or staff were the target of the attack.
"We are still searching for the victim, who is also thought not to have been injured, and the offender who made off in the vehicle," said West Midlands Police.
Det Insp Richard Marsh said a number of people were outside the school at the time and he urged them to contact the force.
"We are still trying to identify the vehicle and the public could have crucial information to assist our enquiries," he said.
"We appreciate this will have caused some shock in the community, but we believe this was a targeted incident unconnected to the school.
"We are still trying the establish the full circumstances behind what happened and we need the victim to come forward, along with the help of witnesses in the area at the time."