GILROY -- A standoff at a Kern Avenue apartment complex between police and a man who they feared was armed with guns and a bomb ended late in the afternoon when the suspect emerged and surrendered, telling officers that he had been lying about the weapons, according to city officials.

Police went to the Cypress Pointe Apartments at 8200 Kern Avenue when residents reported a disturbance just after 10 a.m. Arriving officers were told by witnesses that a man -- later identified as 32-year-old Daniel Wheatley -- had made threats involving guns and explosives.

According to a police statement, "Wheatley presented a credible safety threat. He stated he had a bomb and was in possession of a detonator."

A SWAT team, negotiators and the Santa Clara County sheriff's bomb squad responded to the complex where Wheatley was holed up in his apartment, and a nearby elementary school was placed on lockdown, according to police. Kern was closed between Welburn Avenue and First Street.

Police believed Wheatley's threat could be true, and SWAT officers "prepared to introduce chemical agents into his apartment in an attempt to force Wheatley away from any potential explosive device and safely resolve the incident."

However, Wheatley surrendered as the officers approached his residence around 4:20 p.m.

"When the suspect emerged he said he was lying" about the guns and bomb, said Gilroy city spokesman Joe Kline. The bomb squad searched Wheatley's apartment and the surrounding area, and found no potential explosive devices.

Wheatley was arrested on suspicion of making criminal threats and booked into the Santa Clara County Main Jail.

Anyone with information about the threats is asked to contact Gilroy police at 408-846-0335. Those wishing to remain anonymous can call We-Tip at 8000-782-7463.

Contact Eric Kurhi at 408-920-5852. Follow him at Twitter.com/erickurhi.