(CNN) The man accused of throwing a 5-year-old over a third-floor railing at Minnesota's Mall of America pleaded guilty to the crime Tuesday, according to the Hennepin County attorney's office.

Emmanuel Aranda, 24, struck a plea bargain to avoid trial, said Chuck Laszewski, a spokesman for the prosecutor's office. The office intends to seek the maximum punishment for attempted first-degree murder, which is 19 years in prison, he said.

Sentencing is set for June 3.

As attorneys worked to hammer out the deal, Aranda conceded he intended to killed the boy, Laszewski said, recounting an exchange between the defendant and prosecutor.

"You didn't just drop him; you threw him over," prosecutor Cheri Ann Townsend said, according to Laszewski.

Read More