The Air National Guardsman accused of one of the biggest intelligence leaks in years was repeatedly warned by his superiors about his handling of classified information, prosecutors said Wednesday, alleging that he may have shared sensitive secrets with people outside the USA.

Lawyers for the Department of Justice made court documents to urge a judge to keep Jack Teixeira behind bars before his trial, with a second hearing on the matter scheduled for Friday.

Teixeira, 21, an airman first class who was assigned to the 102nd Intelligence Wing, is accused of leaking top-secret Pentagon documents on Discord, a social media platform used primarily by online gamers. The case has sparked an international outro, raising questions about the ability of the United States to protect its secrets.

Teixeira, who pleaded not guilty, was arrested on April 13 and could face a prison sentence of more than 25 years if convicted, according to previous court documents from the prosecution.

In September, six months before his arrest, Teixeira was seen «taking notes on classified intelligence information» before putting them in his pocket, according to an Air Force memo written at the time, filed with the court by prosecutors on Wednesday.

Teixeira’s superiors asked him if he intended to share the notes, before telling him in a meeting to «no longer take notes in any form on classified intelligence information,» the memo says.

A month later, another Air Force memo said the airman had failed to do this, “potentially ignoring the cease and desist order to dig into intelligence” when he asked “very specific questions” during an internal briefing. They told him to focus on his job, he said.

Finally, in February, a colleague saw Teixeira operating a machine connected to the Defense Department’s Joint Global Intelligence Communication System, its internal system for sharing sensitive information, according to a third Air Force memo. He was seen “viewing content that was not related to his primary duty” and was instead “related to the intelligence field,” he said.

Prosecutors have previously called the defendant a «serious flight risk» and warned that a «foreign adversary» could try to help him escape the United States and give him a safe haven.

Last month, a federal judge refused to release him immediately but did not rule on the matter.

Teixeira’s lawyers filed their own documents on Wednesday, providing a list of eight defendants involved in other Espionage Act cases in which courts have approved their pre-trial release.

Teixeira should not be compared to Edward Snowden, the American exile who stole classified information from the National Security Agency, as the prosecution has tried to do, the defense team said. Snowden «fled the country» before his arrest and was already in China at the time of his leak, he said, having «orchestrated a coordinated plan to seek asylum in other countries,» he said.

The defense has also said there are no allegations that he ever intended to widely distribute the documents.

In response to this, the prosecution said there were 150 users on the server where Teixeira is alleged to have shared his information, and «there may now be many more users actively seeking access to classified information,» their memo said.

“Among the individuals with whom the defendant shared government information are several individuals who claimed they resided in other countries and logged into the social media platform using foreign IP addresses.”

In the messages, Teixeira bragged about the scope of the information he had access to, writing: «The information I give here is less than half of what is available,» prosecutors said. He also acknowledged that he was not supposed to share the information, prosecutors said, writing in another message: «All the m—- I’ve told you I’m not supposed to,» according to the Justice Department filing.

Teixeira is charged with unauthorized withholding and transmission of national defense information and unauthorized removal and withholding of classified documents or materials, according to court records. Prosecutors have called this “an incredibly large and damaging release of classified national defense information” that could be used by US adversaries against them.

In another filing late last month, prosecutors said Teixeira: had a history of making violent and racist comments, including social media posts about wanting to carry out a mass shooting; keeping «an arsenal of weapons» and tactical equipment at his home; and trying to thwart federal investigators by apparently destroying evidence.

The Associated Press and joseph cradduck contributed.