WESTFIELD — An armed Delaware man found outside an elementary school with a loaded handgun, a stockpile of ammunition and a folding knife faces five years in prison under a plea deal, acting Union County Prosecutor Lyndsay Ruotolo said Monday.

Thomas J. Wilkie, 46, appeared in Union County Superior Court, where he pleaded guilty to a single count of second-degree unlawful possession of a weapon.

As reported by NJ.com, when asked Monday by his defense attorney if he had any intention of taking the handgun inside the school with him, Wilkie said "no".

The same report also said Wilkie confirmed the gun was registered in Delaware but not New Jersey.

On June 13, 2019, just before 4 p.m., Westfield Police found Wilkie in a parked SUV outside Tamaques Elementary School, holding a .45-caliber handgun loaded with hollow-point bullets, Ruotolo said.

Prosecutors said police had gotten a call from New Castle County Police Department in Delaware that a man later identified as Wilkie was headed to the school and potentially armed.

Wilkie also was found to be carrying two more loaded clips of ammunition and a folding knife, while 130 additional rounds of ammunition were stashed in the vehicle’s trunk, according to Westfield police.

After-school activities were underway when Wilkie was found, so the school was placed on lockdown for about 90 minutes, as police swept the school with K9 units.

According to criminal complaints and police affidavits obtained by New Jersey 101.5 News, the principal told police that Wilkie had walked into the building several times and had asked to speak to a particular teacher before officers arrived.

Wilkie later told police he went to the school to look for his lover. The teacher, however, was not at the school when Wilkie showed up, police said.

At the beginning of the 2019-2020 school year, Westfield Superintendent of Schools Margaret Dolan outlined a number of updated security measures, including a requirement for school visitors to make an appointment in advance. Visitors also "should be prepared to show proof of a government-issued identification" and must sign a visitor log and receive a temporary ID badge from each school's main office.

Wilkie has remained in Union County Jail for the nearly seven months since his arrest.

A federal bankruptcy filing obtained by NJ 101.5 News said Wilkie is divorced and paying child support, and also said that he suffers from “severe bipolar illness."

Sentencing in the case has been scheduled for Friday, Feb. 21.

Under the expected term, Wilkie would be eligible for parole after 42 months in prison, Ruotolo said.

With previous reporting by Sergio Bichao

More from New Jersey 101.5:

Sign up for the NJ1015.com Newsletter

Get the best of NJ1015.com delivered to your inbox every day.