A man broke into the home of his daughter's mother and tried to make off with the child, officials said.

Joshua Irizarry-Melendez tried to take the child from an upstairs room of her home in the 1200 block of Gordon Court in Bethlehem around 3:10 p.m. Thursday, after pushing in the first-floor window, officials said.

Irizarry-Melendez was foiled by the child's mother, who was in the shower when she heard him come upstairs, officials said.

Irizarry-Melendez, 22, of 1947 East 3rd St., Bethlehem, was arraigned on charges of burglary, criminal trespass and harassment and committed to the Northampton County Prison on $35,000 bail, according to court documents.

A preliminary hearing is set for 9 a.m. Aug. 5.