The victim was found naked and dead inside the closet of an abandoned building in March.

PITTSBURGH (KDKA) – A man charged with murdering his girlfriend and an unborn baby has pleaded guilty but mentally ill.

The Allegheny County DA’s office says during a remote hearing Thursday, James Wilson pleaded guilty but mentally ill to one count of third-degree murder and one count of third-degree murder of an unborn child in connection with Brittany Alker’s death in March.

READ MORE: Former Steelers WR Ryan Switzer Says Son Is Moving From ICU After COVID-19 Diagnosis, Surgery

According to court paperwork, police found Alker naked and dead inside a closet on the second floor of an abandoned building on Forest Way in Homewood West.

READ MORE: Suspect Sentenced To 20-40 Years In Prison For Fineview Shooting

Her body was discovered after police took Wilson to the hospital for medical attention, then picked him up again after he called 911. That’s when investigators say he admitted to the murder.

According to court paperwork, Wilson told police he and Alker were both homeless and had been dating for years, and when he learned she was with “numerous” other men he went into a “rage.” The criminal complaint says he told police he’d strangled her with his belt.

MORE NEWS: Pirates Looking For All-Star Teachers

The DA’s office says a sentencing hearing is scheduled for Jan. 14, 2021.