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: Pittsburgh Firefighters Unveil Plaque Memorializing Their Fallen Brothers And Sisters

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: Grandmother Of Wandering Child Charged With Child Endangerment, Public Drunkenness

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: Pitt Offering Prizes, Including Up To $2,500 In Cash, To Students Vaccinated Against COVID-19

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