This story has been updated.

Baltimore County police found a pellet gun in a vehicle Monday afternoon at Stevenson University in Owings Mills while they were investigating a report of a person with a long gun on campus.

The school, just northwest of Baltimore, had been placed on lockdown for several hours after police received a 911 call reporting that two people had seen what they thought was a person with a gun. That call came in at about 2:20 p.m. on Monday, and school officials issued an alert via the university’s Web site that said an “active shooter” was reported on campus and urging the campus community to “shelter in place until further notice.”

Kevin J. Manning, the university’s president, said in a statement to the university community late Monday that the lockdown and report of weapons on campus appears to have been “caused by two students who had the poor judgment of hunting in the woods with two BB rifles near campus.”

“While we are relieved with this safe outcome, this has been a sobering experience for us and our families,” Manning said. “This reminds us all of the importance of our ‘see something, say something’ mantra. Nothing is more important than your safety.”

The police department sent out a tweet Monday evening saying that officers were talking to two male students who “came out of a campus building to voluntarily talk to police.”

The school posted a message on its Web site Monday evening saying that the “emergency situation at the Owings Mills Campus no longer exists. It is safe to exit your location.”

The school canceled classes and activities at the Owings Mills campus Monday evening.