SACRAMENTO (CBS13) – The man who stabbed hometown hero Spencer Stone pleaded guilty to attempted murder in court on Friday.

James Tran agreed to a nine-year sentence. He pleaded guilty to the charges of attempted murder and enhancements that he caused great bodily injured and used a deadly weapon.

READ MORE: El Dorado County Widow's Stolen Wedding Ring Recovered: 'It Was One In A Million Chances That I Got It Back'

The formal sentencing will happen on May 12.

James Tran was arrested in connection with Spencer Stone’s stabbing. (Credit: Sacramento PD)

According to the Sacramento Bee, Stone was in court and told a reporter he thinks his attacker should have gotten more time.

READ MORE: Canceled 2nd Vaccine Appointment? How Long Can You Wait — And Where Can You Get It?

Stone was out with a group of friends in midtown Sacramento in October 2015 when surveillance video shows his group and another group getting into a fight.

Stone was stabbed multiple times and his attackers got away.

Tran was arrested a few weeks later.

MORE NEWS: WATCH: Ripon High School Principal Hailed A Hero After Attempting To Take Down Suspect

Stone, along with childhood friends Alek Skarlatos and Anthony Sadler, became internationally famous after they helped stop a gunman on a Paris-bound train in August 2015.