A judge sentenced James Wilson, who police said is homeless, to prison time on Friday.

By: KDKA-TV News Staff

PITTSBURGH (KDKA) — A Pittsburgh man who pleaded guilty, but mentally ill, in the killing of his pregnant girlfriend is headed to prison.

READ MORE: Man In Stable Condition After Being Shot In Terrace Village

On Friday, a judge sentenced James Wilson, who police said is homeless, to serve 18 to 40 years in prison after pleading guilty, but mentally ill, in December in the killing of Brittany Alker and her unborn child in March.

READ MORE: Friends And Family Say Final Goodbyes To Ahmir Tuli

Investigators found the woman’s body in a closet. 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.

MORE NEWS: Ex-U.S. Attorney Trying To Help Free Man Convicted Of Killings

Investigators say she had been strangled.