A US pilot accused of leaking classified documents had received repeated warnings for misusing a security clearance that gave him access to classified information, but was nevertheless allowed to retain the high-level clearance, court documents show.

Jack Techiera, 21, is accused of orchestrating the biggest leak of classified U.S. documents in a decade and posting highly sensitive information online that has severely damaged the U.S. military.

The published documents revealed U.S. concern about Ukraine's military capabilities against Russian forces, and showed that Washington appeared to have spied on allies Israel and South Korea, among other sensitive details.

Prosecutors have asked to keep Techera in custody pending trial and have submitted documents to support their arguments, including copies of three U.S. Air Force memos, some of whose information has been partially withheld, stating that Techera acted suspiciously on several occasions.

A document dated September 15, 2022, stated that Tecera "was seen taking notes on classified information" and "was instructed not to take any notes in any way regarding classified intelligence."

Another subsequent document noted that the problem persisted because Tecera ignored "the order to stop diving into intelligence" and focused only on his job.

In late January, Techiera was seen "accessing intelligence-related content unrelated to his primary job," according to a third document.

Techiera was arrested in April after a week-long investigation and charged with two charges carrying a maximum sentence of 10 years in prison.

Despite multiple warnings about the mishandling of classified information, Techera was still on security clearance at the time of his arrest, according to FBI testimony.

A judge is expected on Friday to rule on the prosecution's request to continue Techira's detention.