NORTH PLAINFIELD — A 27-year-old man has been accused of trying to suffocate his young daughter to death by putting the 2-year-old in a plastic bag.

Lamar S. Waller, who police said was homeless but recently staying at a township motel along Route 22, was arrested on Saturday afternoon.

Police responded to a 911 call around 12:30 p.m., reporting a young child inside of a bag at a local motel.

Officers arrived to see Waller holding the girl, who was unconscious but still had a pulse, according to Somerset County Prosecutor Michael Robertson.

Surveillance footage from a motel hallway shows Waller carrying the child in a plastic bag and briefly leaving her in front of another motel room, before returning and picking up the encased child while “being confronted by other family members,” Robertson said.

Waller then went into his room, where the child’s mother was able to save her daughter by ripping open the plastic bag and begin CPR, according to the prosecutor.

Witnesses then alerted law enforcement.

The child was rushed to a hospital in critical condition and has since been reported as in stable condition and is expected to survive, he said.

Waller was charged with first-degree attempted murder and second-degree endangering the welfare of a child.

Robertson did not release a motive.

The state Division of Child Protection and Permanency also has been notified and is investigating the case.

Waller was taken to Somerset County Jail, pending a detention hearing.

Anyone with information relating to the incident can contact the Somerset County Prosecutors Office Child Abuse Unit at 908-231-7100 or North Plainfield police at 908-769-2937, or via the STOPit app, by using access code: SOMERSETNJ.

Information can also be provided anonymously through the Somerset County Crime Stoppers’ Tip Line at 1-888-577-TIPS (8477).

LOOK: Here are the best small towns to live in across America