GREENSBURG, Pa. — A man pleaded guilty Tuesday to stabbing 20 fellow students and a security guard at his suburban Pittsburgh high school more three years ago, and likely faces decades in prison when he returns for sentencing.

Alex Hribal said nothing in court other than to reply “guilty” to 21 counts each of attempted homicide and aggravated assault, plus a weapons charge.

Hribal, who turned 20 earlier this month, was 16 when he used two eight-inch kitchen knives to stab and slash his way through the hallways of Franklin Regional High School in Murrysville before classes began on April 9, 2014.

Four students were critically injured at the school about 15 miles east of Pittsburgh, including one who required a liver transplant. All survived and have since recovered.

Psychiatrists for both the defense and prosecution have testified Hribal purposely carried out the attack on the birthday of Columbine High School killer Eric Harris, whom Hribal “worshipped.” Hribal first hoped to commit the attacks on the 15th anniversary of the Columbine massacre — which was April 20, 1999 — but couldn’t because Franklin Regional wasn’t in session that day, the doctors testified.

Defense attorney Patrick Thomassey has always acknowledged Hribal committed the stabbings, but had hoped to have him declared legally insane and either acquitted at trial for that reason or to be allowed to plead guilty but mentally ill to the charges. The judge in February rejected that request after hearing several days of testimony last year.

Had Hribal been allowed to enter that plea, he would have begun a prison term in a mental hospital, then would have been transferred to prison if doctors ever deemed him cured.

Thomassey said he will be arguing for as light a sentence as he can, based on Hribal’s mental health issues.

“How do you defend this case? It’s not a whodunit. It’s a question of what can we do to help this kid,” he said.

Westmoreland County District Attorney John Peck said he plans to argue for the same 30 to 60 year sentence that he offered Hribal in a plea deal months ago that was rejected, calling it “an appropriate sentence.”

Peck said he met again with victims in the high school’s library last week and the 30 to 60 year offer remains the general consensus.

He said the victims will “live with that trauma for a long time, perhaps longer than what Mr. Hribal will serve as a sentence in prison.”

If Hribal received the maximum sentence for each count imposed consecutively, he’d face more than 800 years in prison — but Common Pleas Judge Christopher Feliciani is expected to craft a sentence closer to that offered by Peck, once a presentence report on Hribal’s background and other factors is completed.

Hribal’s parents, Harold and Tina Hribal, declined to comment as they left court, his mother clutching a stuffed monkey that was her son’s childhood toy.

Thomassey said he would be calling several character witnesses at the sentencing, which should happen in about 90 days, including Hribal’s parents.

“They have remained very quiet for the past 3 ½ years and they have a lot to say,” he said.