Jack Teixeira, the Massachusetts Air National Guard Airman accused of leaking classified defense secrets to Discord, has pleaded guilty. New York Times reports The 22-year-old withdrew his not guilty plea on Monday, replacing a guilty plea with up to about 16 years in prison. Had he gone to trial and lost, he could have faced up to 60 years in prison.

In federal court in Boston, Teixeira pleaded guilty to six counts of “intentionally retaining and transmitting national defense information” under the Espionage Act. Federal authorities arrested the airman at his mother’s house last April.

Air National Guardsman accused of sharing classified documents to a Minecraft-focused Discord server in late 2022. The files released include volumes of information about the war in Ukraine (including details of military equipment and Russian and Ukrainian troop movements), as well as Russia’s attempts to stockpile more weapons from Egypt and Turkey. The content eventually landed on 4chan, Telegram and other Discord servers.

The leaked documents also contained a report on the hacking of an unnamed US company by a “foreign adversary” and details of a plot to attack US troops serving overseas.

The government said it found no evidence of a deliberate motive for espionage, nor did it accuse Teixeira of acting as an Edward Snowden-style whistleblower. Instead, prosecutors concluded that he wanted to gain status with his online friends. New York Times reports that a senior federal law enforcement official, speaking anonymously to the newspaper, said the DOJ would not have agreed to the reduced sentence if it had uncovered a more nefarious motive.

The judge presiding over the case, Indira Talwani, has scheduled a hearing in September to finalize her approval of the deal. Sentencing guidelines range from 11 to over 16 years in prison. His lawyer, Michael K. Bachrach, told reporters that Teixeira’s immaturity played a key role, while vowing that he would push for the lowest sentence. “He is very much a child,” said the lawyer. “We will be able to establish why his youth played a significant role.”

A NYT investigation of more than 9,500 of Teixeira’s messages released last May reveal an obsession with “guns, mass shootings, shady conspiracy theories — and proving he’s right and knows.”