A beloved Pennsylvania doctor called out his near-naked killer by name as he was stabbed to death in bed, according to a criminal complaint.

Idris Evans, a pediatric critical care physician, yelled “Elijah” during the middle-of-the-night attack as if he knew him, his wife said after witnessing her husband’s horrific murder, WPXI reported citing court docs it obtained.

The grieving wife said she didn’t know suspect Elijah Hemingway, 32, who allegedly broke into the family’s home and crept into their third-floor bedroom to launch the disturbing attack, according to the docs and cops.

Elijah Hemingway, 32, was arrested in connection with the fatal stabbing of Dr. Idris Evans (pictured) and the wounding of his wife in Edgewood, Pittsburgh. UPMC

Hemingway claimed to have been invited to the home — where the doctor’s two children were sleeping — but officials found no evidence to back his story, the outlet reported.

When pressed by cops, Hemingway couldn’t explain how he knew the doctor, Fox News reported.

“We do not know if there was any preexisting relationship, though the female victim did not know this male, we are trying to determine if the two males knew each other, if at all,” said Assistant Superintendent of the Allegheny County Police Department Vic Joseph.

“The wife believes she heard her husband say a name — ‘Elijah,’ but the wife is also unclear if the actor identified himself by name, so we’re still investigating that.”

The knife-wielding assailant stormed into the home just after 12:30 a.m. Thursday, cops said.

Hemingway appeared “psychotic” and was rambling about God and “being God” when he busted into the couple’s room — with their kids sleeping in another room nearby, according to the complaint.

Hemingway allegedly stabbed and killed Evans.

Suspected killer Elijah Hemingway is placed into the back of an ambulance after he was found hiding behind a nearby home following his deadly attack. WPXI

Evans and his wife desperately tried “fighting back the best of their ability” and both suffered extensive defensive wounds on their hands, Joseph said.

The couple was rushed to a local hospital, where Evans was pronounced dead and his wife was listed in critical condition.

The children, ages 8 and 12, ran to a neighbor’s home after their mom yelled for them to flee.

Police were called to Evans’ home at around 12:30 a.m. following reports of a stabbing. WPXI

Hemingway was hunted down by a police K9 to a neighboring home where he was found with lacerations on his hands and transported to hospital, officials said.

He was slapped with a slew of charges, including criminal homicide, aggravated assault, burglary and criminal trespass, according to officials.

Hemingway had been out on a nonmonetary bail following a July arrest for burglary and theft back in February, according to court records viewed by The Post.

Evans was a physician and the co-Medical Director of UPMC Children’s Hospital of Pittsburgh’s Pediatric Transport Team as well as an Assistant Professor of Critical Care Medicine at the University of Pittsburgh, according to his online bio.

“The UPMC and University of Pittsburgh community is deeply saddened by the tragic loss of Dr. Idris Evans, a pediatric critical care physician at UPMC Children’s Hospital of Pittsburgh and an assistant professor of critical care medicine at the University of Pittsburgh,” UPMC said in a statement to WPXI.