A man charged for slashing the throat of a woman outside an Erie pharmacy in 2018 pleaded guilty but mentally ill to the attack.

Steveland Robinson, 31, entered the plea to a count of attempted homicide Friday afternoon. In exchange, all other charges were dropped.

Robinson was charged with slashing a young woman's throat with a box cutter in July 2018 as she was walking into the Walgreens at W. 38th and Peach St. where she worked.

Police believe it was a random attack, and Robinson was originally ruled incompetent to stand trial.

Torrance State Hospital determined he was restored to competence in March 2019.

Robinson faces up to 20 years in prison and a maximum fine of $25,000 when he is sentenced Jan. 15.