An upstate New York man raped his 8-month-old daughter before killing her in a cemetery, court documents show.

Cody Franciscovich, 25, of Tioga, was naked when he was arrested near the Deep Well Motel in Tioga County on Sunday after the girl’s mother requested a welfare check, telling a dispatcher that Franciscovich had left the motel with the infant earlier, the Binghamton Press & Sun-Bulletin reports.

State troopers found Franciscovich along a road west of the motel on Route 17C and he led investigators to a pond behind nearby St. Patrick’s Cemetery, where the girl, Ruby Franciscovich, was found floating face down about 25 feet from the water’s edge, police told reporters Monday.

The girl was later pronounced dead at a hospital in Johnson City, the newspaper reports.

Franciscovich pleaded not guilty Wednesday to a first-degree murder charge and is due back in court on Friday. While he has not been formally charged with rape, a felony complaint filed in Tioga Town Court detailed the allegations against him.

“On the aforementioned date and place, the abovementioned defendant did knowingly and intentionally commit the crime of murder in the first-degree when in the immediate flight thereafter of committing the crimes of rape in the first degree and criminal sex act in the first degree he killed his eight month old daughter,” the complaint obtained by the newspaper reads.

Franciscovich, who faces up to life in prison if convicted, had no questions for a judge during Wednesday’s court appearance. He remains held without bail at a jail in Tioga County, the Binghamton Press & Sun-Bulletin reports.

Attorneys for Franciscovich — public defenders George Awad and Tom Cline — declined comment when reached Wednesday by The Post.

A vigil for Ruby Franciscovich will be held at the cemetery at 8 p.m. Monday. Organizers are asking anyone who plans on attending to wear red in the girl’s honor.