(CNN) - A New Jersey elementary school was placed on lockdown this week after a man was found in the parking lot with a gun and multiple rounds of ammunition, authorities said.
Officers found the suspect Thursday afternoon in the front seat of his SUV at Tamaques Elementary School in Westfield, according to the Union County prosecutor's office. He was holding a loaded .45-caliber handgun, it said in a statement Friday.
Classes had let out for the day, but the precautionary lockdown went into effect because after-school activities were still going on, CNN affiliate News12 reported.
The man, later identified as Thomas J. Wilkie, 46, of Bear, Delaware, had two additional loaded clips of ammunition on him and 130 more rounds in his vehicle's trunk, the prosecutor's office said.
Police acted on a tip from the New Castle police in Delaware that said Wilkie was on his way to the school and may be armed, according to the statement.
The suspect has been charged with second-degree unlawful possession of a weapon, fourth-degree possession of hollow-point bullets and fourth-degree trespassing on school grounds, according to the Union County prosecutor's office.
On Monday, Wilkie indicated on Facebook that he is homeless and living out of his car.
"To all my FB friends out there I'm currently living in my car and have no where to go if I could surf someone's couch for a safe place to stay I would be eternally grateful," the Facebook post says. "I guess I'll see who my friends really are and who chose to step up and help me I'm no trouble and no I'm not on drugs or any of that s**t."
A post the following day says: "3am and can't sleep with these junkies winos pimps and whores bothering me in my car all night! Ugh homelessness sucks!"
Wilkie is being held in the Union County Jail, pending his first hearing Wednesday.
Convictions on second-degree criminal charges are punishable by five to 10 years in state prison, according to officials.
Information on his attorney was not immediately available.
CNN's Evan Simko-Bednarski contributed to this report.
The-CNN-Wire ™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.