BOSTON >> A federal judge sentenced a Massachusetts Air National Guard member to 15 years in prison Tuesday for leaking classified military documents about the war in Ukraine, actions prosecutors said put the country’s national security at risk, endangered other military members and damaged U.S. relationships with its allies.

Jack Teixeira had pleaded guilty in March to six counts of willful retention and transmission of national defense information under the Espionage Act, nearly a year after his arrest in the most consequential national security breach in years. Wearing an orange jumpsuit in court, he showed no reaction as he was sentenced by U.S. District Judge Indira Talwani.

“Today, Mr. Teixeira has paid a very heavy price for laws he broke, for the incredible damage that he caused,” Acting Massachusetts U.S. Attorney Josh Levy said afterward. “This significant sentence sends a powerful message to every individual who holds a top secret clearance. Anyone who willfully threatens our national security by illegally disseminating classified information will face very serious repercussions.”

Jodi Cohen, special agent in charge of the Federal Bureau of Investigation’s Boston Division, told reporters the sentence held Teixeira accountable for “being one of the most prolific leakers of classified information in American history.”

“This former Air National Guardsman grossly betrayed our country and the oath he took to safeguard its secrets in order to boost his ego and impress his friends,” Cohen said. “This was not a victimless crime. The exceptionally grave damage he caused will impact our national security for decades to come.”

The leaks exposed to the world unvarnished secret assessments of Russia’s war in Ukraine, including information about troop movements in Ukraine, and the provision of supplies and equipment to Ukrainian troops. Teixeira also admitted posting information about a U.S. adversary’s plans to harm U.S. forces serving overseas.

Outside court, Teixeira’s attorney Michael Bachrach called it a “very difficult day” for his client and said Talwani imposed a “very severe punishment.” Still, he said, it was better than taking the case to trial, where Teixeira would have faced 30 years to life behind bars.

“It’s a significant sentence that will deter others,” Bachrach said. “But it’s also one that will allow him to self-reflect and grow. And we fully expect that he will be doing so.”

Before he was sentenced, Teixeira showed little emotion as he stood in court and apologized for his actions. The 22-year-old had previously admitted he illegally collected some of the nation’s most sensitive secrets and shared them with other users on the social media platform Discord.

“I wanted to say I’m sorry for all the harm that I brought and caused,” Teixeira said. “I understand all the responsibility and consequences fall upon my shoulders alone and accept whatever that will bring.”.

Afterward, Teixeira hugged one of his attorneys, looked toward his family and smiled before being led from court. His family left without commenting to reporters but his mother and others did submit letters to the court seeking leniency.

“I know Jack deeply regrets his actions and is ready to accept his punishment for his part in this situation,” his mother, Dawn Dufault, wrote. “While I understand the severity of his charges and the importance of ensuring justice, I implore you, Your Honor, to consider Jack’s true nature and his unique challenges, as I have observed over the years.”