A former Steinmetz College Prep student was released without charges after he allegedly trespassed twice in the Northwest Side school last week and led officers on a foot chase.

The former student entered the school first about 10 a.m. Friday through a back door of the building, at 3030 N. Mobile Ave., Chicago police said.

A teacher saw the former student carrying a plastic container and notified security, but the former student left before officers arrived, police said. He left a container of cookies, a police spokesman said.

The school was placed on lockdown until 11:53 a.m. when officers secured the building, police said.

He returned to the school about two hours later and was chased by officers to the 6300 block of West Fletcher Street, where he was arrested at 12:45 p.m., police said.

Police said Monday morning that the man was released without being charged.

In a statement to parents, Chicago Public Schools said no one was harmed.

“This morning, we were made aware there was a community member that had entered our school building without authorization,” the letter reads. The school said the lockdown was lifted once “CPD confirmed that there was no threat to students and staff.”