Jack Teixeira, a member of the Massachusetts Air National Guard charged with leaking classified military documents on a social media platform, pleaded guilty on Monday, Reuters reported.

Teixeira, who has remained in custody since his arrest last April, admitted wrongdoing during a hearing in federal court in Boston after striking a plea deal.

The 22-year-old pleaded guilty to six counts of willful retention and transmission of classified information relating to national defense over a leak last year of a trove of classified records to a group of gamers on the messaging app Discord, according to Reuters.

Assistant Attorney General Matthew Olsen, who heads the US Department of Justice's National Security Division, at a press conference said the plea "brings a measure of closure to a chapter that created profound harms for our nation's security."

In exchange for his plea, prosecutors agreed not to charge Teixeira with further violations of the Espionage Act.

The plea deal calls for a sentence of at least 11 years in prison, and prosecutors plan to ask US District Judge Indira Talwani to sentence Teixeira to 16 years, eight months in custody. His sentencing is scheduled for September 27.

The leak of documents by Teixeira, posted largely on social media sites, was believed to be the most serious security breach since more than 700,000 documents, videos and diplomatic cables appeared on the WikiLeaks website in 2010.

One of the leaked top-secret documents contained a short paragraph about Israel and alleged involvement by Mossad officials in the protests against the government’s judicial overhaul.

Another top-secret document that was leaked contained a US intelligence analysis of Israeli policy regarding military aid to Ukraine and stressed that US pressure could drive Israel to deliver more military assistance to Kyiv.