Updated at 9:37 p.m.

UNION, NJ — A man alleged to have prompted the evacuation of a Walmart store on Route 22 Thursday morning turned himself in after seeing “significant media coverage” of the incident in which he is accused of brandishing an airsoft gun while in the store, authorities said.

Joshua K. Phillips, 20, of Newark, is charged with third-degree creating a false public alarm, third-degree possession of a weapon and shoplifting, a disorderly persons offense, Union County acting Prosecutor Lyndsay V. Ruotolo and Union Police Director Daniel Zieser announced Thursday.

Sign Up for Westfield Newsletter
Our newsletter delivers the local news that you can trust.

Shortly after 10:45 a.m., numerous Union Police Department officers responded to the Walmart at Springfield Road and Route 22 East on the report that a man wearing a mask had been seen with a gun in an aisle, the joint statement said.

Police evacuated the store and a search of the building revealed that a man later identified as Phillips had removed a large black airsoft gun from its packaging and later discarded it elsewhere in the store, the authorities said.

Police released an image taken from security footage showing Phillips walking into the store.

“Phillips turned himself in at Union Police Department headquarters Thursday evening after becoming aware of significant media coverage of the incident,” the joint statement said. “He was subsequently lodged in Union County Jail pending a first appearance and detention hearing to take place in Superior Court.”

Convictions on third-degree criminal charges can be punishable by three to five years in state prison, authorities said.

Ruotolo offered praise for local, county and federal authorities, who responded to the incident.

Sign up for email news alerts and Download the TAPinto mobile app for Android or iOS.