A man who confessed two decades ago to killing his girlfriend's 3-year-old daughter — only to have the case dropped — pleaded guilty to involuntary manslaughter.

Timothy Wayne Widman, 52, of Pittsburgh, agreed to the plea deal Thursday and was sentenced to two to four years in prison.

Widman had been accused of involuntary manslaughter two decades ago in the death of Nicole Lynn Bryner, but prosecutors dropped the charge in 1987 because state law then required a body to prove a homicide. Bryner's body has never been found.

Prosecutors were able to file charges last year because of a change in the law that said a body was not needed.

In March 1982, Nicole's mother, Melody Childs, reported her daughter missing from a supermarket.

But four years later, Widman told police that on March 9, 1982, he slapped Nicole when she became angry after she bit his toe, according to court documents. He said she fell backward and hit her head, police said.

Widman told the mother what happened and they put the girl to bed, according to police. They later realized she was dead and put her body in a plastic bag, and Widman buried it in a wooded area, police said.

Childs was charged with hindering apprehension and giving false reports in 1986, but the charges were withdrawn in 1987, police said. She died in 2001.