A US airman suspected of leaking classified files was warned repeatedly about his handling of classified information.

In a court filing, US prosecutors argued Jack Teixeira should remain in detention because of his “wilful disregard” for protecting information.

He allegedly leaked files even after he was warned by his superiors on two separate occasions last year.

The 21-year-old has been in custody since the FBI arrested him on April 14.

He was charged with the unauthorised transmission and retention of defence materials after dozens of classified files appeared in the online chat room Discord.

They included sensitive information about US allies and the war in Ukraine.

A judge will soon decide whether he should remain in detention until his trial and is expected to hear arguments on Friday.