Police in North Carolina say the manager of a bank branch thwarted an attempted robbery by holding a door shut even as the suspect banged on the door with a small handgun.

Authorities told news media outlets that a person wearing a mask approached the back door of a PNC Bank branch in Zebulon, just east of Raleigh, shortly after it opened Thursday. They said the manager saw the suspect approaching and held the door shut.

The outlets cited a police statement as saying the suspect showed a small, black handgun and used it to hit the door. The manager continued to hold the door, and the suspect ran off without getting into the bank.

Officials said a nearby middle school was placed on lockdown after the would-be robber escaped.