A US federal judge on Tuesday sentenced an Air National Guard member to 15 years in prison, after he pleaded guilty to leaking highly classified military documents about the war in Ukraine.

Jack Teixeira pleaded guilty earlier this year to six counts of wilful retention and transmission of national defence information under the Espionage Act, after his arrest in the most consequential national security case in years.

He was taken into court in Boston, Massachusetts, in an orange jumpsuit and showed no visible reaction as he was sentenced by US District Judge Indira Talwani.

Earlier in the hearing he apologised before the judge.

Jack Michael Teixeira, father of Jack Teixeira
Jack Michael Teixeira, centre, father of Massachusetts Air National Guardsman Jack Teixeira. arrives at federal court for the sentencing (Steven Senne/AP)

“I wanted to say I’m sorry for all the harm that I brought and caused,” Texeira said, referring to the “maelstrom” he caused to friends, family anyone affected overseas.

“I understand all the responsibility and consequences fall upon my shoulders alone and accept whatever that will bring,” he said, standing as he addressed the judge.

Prosecutors had originally requested a 17-year sentence for him, saying he “perpetrated one of the most significant and consequential violations of the Espionage Act in American history”.

Defence lawyers had sought an 11-year sentence.

In their sentence memorandum, they acknowledged that their client “made a terrible decision which he repeated over 14 months”.

But they argued that Teixeira’s actions, though criminal, were never meant to “harm the United States”. He also had no prior criminal record.

The security breach raised alarm over America’s ability to protect its most closely guarded secrets and forced the Biden administration to scramble to try to contain the diplomatic and military fallout.

The leaks embarrassed the Pentagon, which tightened controls to safeguard classified information and disciplined members found to have intentionally failed to take required action about Teixeira’s suspicious behaviour.

The 22-year-old admitted that he illegally collected some of the nation’s most sensitive secrets and shared them with other users on the social media platform Discord.

His lawyers had described him as an autistic, isolated individual who spent most of his time online, especially with his Discord community.

“His intent was to educate his friends about world events to make certain they were not misled by misinformation,” the lawyers wrote.

“To Jack, the Ukraine war was his generation’s World War II or Iraq, and he needed someone to share the experience with.”

Prosecutors in court filings countered that Teixeira did not suffer from any intellectual disability that would prevent him from knowing right from wrong, adding his post-arrest diagnosis of “mild, high-functioning” autism was of “questionable relevance” to the proceedings.

Teixeira, who was part of the 102nd Intelligence Wing at Otis Air National Guard Base in Massachusetts, worked as a cyber transport systems specialist, which is essentially an information technology specialist responsible for military communications networks.

He remains in the Air National Guard in an unpaid status, an Air Force official said.

Authorities said he first typed out the classified documents he accessed and then began sharing photographs of files that bore SECRET and TOP SECRET markings.

Prosecutors also said he tried to cover his tracks before his arrest, and authorities found a smashed tablet, laptop and an Xbox gaming console in a rubbish bin at his house.

The leak 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 US adversary’s plans to harm US forces serving overseas.