A Delaware man was arrested after police found him in the parking lot of a New Jersey elementary school with at least one loaded handgun and more than 130 rounds of ammunition, authorities said Friday.

Thomas J. Wilkie, 46, was found holding a .45-caliber handgun with hollow-point bullets while sitting in his car at Tamaques Elementary School in Westfield, New Jersey, on Thursday afternoon, according to a statement the Union County prosecutor’s office released Friday.

He also had two filled clips on him along with several dozen rounds of ammunition in his trunk.

Wilkie went to the school looking for a female faculty member he had been in a relationship with, a senior law enforcement official told NBC News.

He was unarmed when he first walked into the school to find her, but she wasn't there. When he called her, she said she would be returning to the school later, so Wilkie sat in the parking lot and called his brother, a law enforcement official said.

The brother alerted authorities in Delaware, fearing Wilkie was not in his right mind, the official said.

The New Castle County Police Department in Delaware reported to the Westfield Police Department that an armed man may be on his way to the school, the statement from the prosecutor's office said. The school was placed on lockdown as after-school activities were underway when police arrived at about 4 p.m.

The students were released to their parents at about 5:30 p.m. after Wilkie was arrested and investigators had searched the building, according to the New Castle County Police Department.

Wilkie was 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 prosecutors. He's being held at the Union County Jail.