The Massachusetts Air National Guard member accused of leaking secret military papers urged a judge on Monday to release him from custody, noting that former President Donald Trump and his co-defendant Walt Nauta are free ahead of trial on charges of mishandling classified documents.

Jack Teixeira, 21, has been in custody since he was arrested in April for allegedly publishing Pentagon secrets about the war between Ukraine and Russia, and other sensitive material to Discord, a social media platform primarily used by online gamers. The documents exposed U.S. pessimism about Ukraine's war effort, Ukraine's offensive into Russia, U.S. special-operations troops inside Ukraine and other secrets.

Magistrate Judge David Hennessy ruled in May that Teixeira must remain behind bars during the case because of a risk that he would attempt to flee the country or obstruct justice, but Teixeira's lawyers are now requesting that a different judge allow him to be freed until his trial. 

His lawyers have suggested he be released to his father and largely confined to his home with location monitoring and no access to the internet.

PENTAGON LEAK SUSPECT JACK TEIXEIRA ENTERS NOT GUILTY PLEA IN FEDERAL COURT

Depiction of Jack Teixeira in court

This artist depiction shows Massachusetts Air National Guardsman Jack Teixeira, right, appearing in U.S. District Court in Boston, April 14, 2023. (AP)

The lawyers argued that Teixeira has no financial ability or incentive to flee, and that the DOJ "greatly overexaggerates" his "risk to national security." Teixeira's lawyers pointed to prosecutors' decision not to hold Trump or Nauta despite them having "extraordinary means" to leave the country.

"Former President Trump and The Trump Organization own properties in multiple foreign countries, and former President Trump has access to a private plane," Teixeira's lawyers wrote. "Yet, the risk of flight posed by their knowledge of national security information, and their abnormal ability to flee, didn’t even result in a request that either surrender their passport."

Teixeira's attorneys said the "disparate approach" in these cases both charged under the Espionage Act shows that the government's argument for Teixeira's "detention on this basis is illusory."

Last month, Teixeira pleaded not guilty to six counts of willful retention and transmission of national defense information. Each count is punishable by up to 10 years in prison.

Trump has pleaded not guilty to 31 counts of willful retention of classified documents and six other charges, including conspiracy to obstruct justice and making false statements. He is accused of holding the materials at his Mar-a-Lago estate in Florida and refusing demands from the government to return them. Trump was not required to surrender a passport since prosecutors said he was not considered a flight risk.

PENTAGON LEAK SUSPECT JACK TEIXEIRA TO BE ARRAIGNED IN FEDERAL COURT

Former President Donald Trump arrives at Trump Tower

Former President Trump has pleaded not guilty to 31 counts of willful retention of classified documents and six other charges, including conspiracy to obstruct justice and making false statements. (AP Photo/Yuki Iwamura)

Though the magistrate judge in Trump's case did instruct the former president to not discuss the case with certain witnesses. Trump has denied any wrongdoing and has repeatedly claimed that the case is politically motivated.

Nauta, a former White House military aide who was working for Trump as a body man at Mar-a-Lago, has pleaded not guilty to six charges including conspiracy, concealing and withholding documents, and making false statements.

Authorities accuse Teixeira, who enlisted in the Air National Guard in 2019, of beginning to share military secrets with other Discord users around January. He allegedly started by typing out classified documents and then sharing photographs of files with "SECRET" and "TOP SECRET" markings. 

Teixeira worked as a cyber transport systems specialist, which is essentially an IT specialist responsible for military communications networks.

Jack Teixeira and documents

This image made from video provided by WCVB-TV, shows Jack Teixeira, in T-shirt and shorts, being taken into custody by armed tactical agents on Thursday, April 13, 2023, in Dighton, Mass. (WCVB-TV via AP)

CLICK HERE TO GET THE FOX NEWS APP

Other members of the small online private chat group where the documents were initially published have said Teixeira's motivation was his desire to impress his friends. After the documents were leaked to the Discord chat, they eventually spread out of the site, which alerted the federal government to the leak.

Prosecutors argued that Teixeira said he may have material that has not yet been released, which they say could be of "tremendous value to hostile nation states that could offer him safe harbor and attempt to facilitate his escape from the United States."

Teixeira's lawyers contest there is no evidence suggesting he is valuable enough for a foreign adversary to be willing to smuggle him out of the country.

The Associated Press contributed to this report.