(Google Street View)" />
Officers combed Chichester city centre as they hunted for the alleged armed suspect.
Pupils at Chichester High School in West Sussex were kept in their classrooms and not allowed to leave the site during the incident.
At least one other school was reported to have been placed in lockdown amid the incident.
Police said "no threats were made and no-one was harmed", and one man has since been detained.
As the situation unfolded, deputy headteacher Tom Brixey told parents: "The school needs to be placed into lockdown."
He added: "This means that students are not allowed to leave the site.
"All children are safe in their classrooms and the school site is safe."
Shortly before 4pm Mr Brixey told parents that students had been allowed to leave the school site after police said it was safe for them to travel home.
He added: "This was not an incident linked to Chichester High School but the wider Chichester area."
A Sussex Police spokesman said officers "responded to a report of a man seen with a shotgun" in the vicinity of Litten Gardens in the city at about 2pm.
They added: "Officers have now detained a man in relation to the incident.
"As the suspect was reported to be near two schools, we worked with them to take precautions to keep pupils and staff safe while we investigated the report.
"No threats were made and no-one was harmed.
"We would like to thank the public for their patience and understanding while we responded to this fast-moving incident."