SOMERVILLE, N.J. (CBSNewYork) — More than a dozen alleged child predators have been arrested after a multi-agency investigation in New Jersey.

The Somerset County prosecutor’s office says in “Operation Open Door,” undercover law enforcement officers posed as underage girls or boys on social media platforms to target online predators.

READ MORE: Lower East Side Residents Protest Construction Of New Luxury Buildings

As a result of the operation, 19 men were arrested between Oct. 23-28. All of the men are accused of reaching out to the undercover officers, believing they were children, and making arrangements to meet for sex at a Somerset County residence when no one else was home.

Officials say most of the men were arrested when they arrived at the home.

READ MORE: Veterans Ride Horses Across Manhattan To Raise Suicide Awareness

RELATED STORY: 15 Apps That Deputies Say Predators May Be Using To Target Children

Sixteen New Jersey men between the ages 20-55 were arrested, along with two men from Indiana and a Pennsylvania man.

In most instances, the undercover officer said they were a 14-year-old child. The prosecutor’s office says one man believed he was talking to a 12-year-old and another believed he was talking to a 13-year-old.

MORE NEWS: Community Leaders, Advocacy Groups Launch 'Boycott Black Murder' Campaign To End Gun Violence

Most of the men are being charged with luring and attempted endangering the welfare of a child. Some have been charged with attempted sexual assault, attempted promotion of prostitution of a child and attempt to promote obscene material to a child.