An illegal immigrant in New Jersey is accused of raping a 6-year-old girl then jumping out of a second-floor window after her father walked in during the assault, police said.

Edgar Mendoza, 32, is accused of breaking into a Trenton, N.J. home at about 1:30 a.m. on Sept. 19 and molesting a 6-year-old girl while she was in bed, according to the Trentonian. Her father realized something was amiss when he noticed an upstairs light was turned off, according to the Star Ledger.

When the father entered the bedroom, he found Mendoza on the young girl’s bed, police said. Mendoza leapt from the second-story window and ran off, police said. The father called police.

TEXAS WOMAN BLASTS 2-YEAR-TERM FOR ILLEGAL IMMIGRANT WHO KILLED HUSBAND, 2 KIDS IN CRASH

Two adults and two children were in the home at the time of the assault, according to the Trentonian.

Mendoza, originally from Guatemala, faces charges of burglary, endangering the welfare of a child, sexual assault and aggravated sexual assault, the newspaper reported.

Detectives stopped Mendoza after the attack and the girl’s father identified him, police said. Detectives later discovered the girl had been sexually assaulted, the Trentonian reported, and she was taken to the hospital for treatment.

ICE TO CALIFORNIA: 'NO CHOICE' BUT TO ARREST ILLEGAL IMMIGRANTS DESPITE SANCTUARY STATE LEGISLATION

Mendoza’s cell phone was found near the home, police said.

Mendoza agreed to remain in jail while his criminal case moves through the courts.

“Due to my situation here, the fact that I don’t have my papers and the fact that I am facing those charges, I think I am going to have to be detained,” Mendoza said during the hearing, according to the Trentonian.