A mother who smothered to death her 1-year-old daughter last year has pleaded guilty to first-degree murder and been sentenced to 30 years in prison.

Samaria Williams, 23, of the 1100 block of South 19th Street will serve 100 percent of her sentence. Before her guilty plea on Wednesday, Circuit Judge John Belz found Williams to be mentally ill at the time of the offense.

Sangamon County State’s Attorney John Milhiser said that allows the Department of Corrections to provide Williams mental health treatment while she is in prison. She is still criminally responsible for her actions, he said.

At the conclusion of her 30-year sentence, if DOC believes her to be a danger to the community, it can petition the court to keep her incarcerated, he said.

Maintenance workers at M.E.R.C.Y. Communities in Springfield discovered the dead child, Azalin Fite, and an incoherent Williams inside the apartment about 1 p.m. July 27, 2012.

Williams had several small stab wounds on her chest that were determined to be self-inflicted.

Milhiser said Williams left a note intended as a suicide note saying if she couldn’t have her child, no one else would.

The apartments where Williams and her child lived are transitional housing for homeless women and their children.

Williams initially was found unfit to stand trial, but a court found her to be fit in January.