A U.S. soldier has been accused of planning an attack on his Army unit by giving classified information -- including the location, movements and security of his fellow soldiers -- to a neo-Nazi Satanist group based in Europe.

Ethan Melzer, 22, has been charged with conspiring and attempting to murder U.S. nationals, conspiring and attempting to murder military service members, providing and attempting to provide material support to terrorists and conspiring to murder and maim in a foriegn country, according to court documents unsealed Monday.

He was arrested by the FBI on June 10 after investigators claimed he gave sensitive military information to the Order of Nine Angles, a British neo-Nazi Satanist group that encourages extreme violence in an effort to detabilize society and attempts to overthrow what it views as Jewish control of global culture and economics.

CHELSEA MANNING ATTEMPTS SUICIDE IN JAIL, LEGAL TEAM SAYS

The United Kingdom group Hope Not Hate referred to O9A as a major influence on Nazi terror groups both in the U.S. and abroad.

"Ethan Melzer plotted a deadly ambush on his fellow soldiers in the service of a diabolical cocktail of ideologies laced with hate and violence," Assistant Attorney General for National Security John C. Demers said. "Our women and men in uniform risk their lives for our country, but they should never face such peril at the hands of one of their own."

Acting U.S. Attorney Audrey Strauss said Melzer was "motivated by racism and hatred as he attempted to carry out this ultimate act of betrayal."

Melzer, who is from Louisville, Ky., joined the Army in 2018. A year later, he allegedly joined O9A.

In October 2019 Melzer and his unit were deployed abroad.

Prosecutors claim that prior to planning his attack, Melzer consumed extremist propaganda from multiple groups including ISIS and said investigators found an ISIS-issued document titled "Harvest of the Soliders" in his iCloud account which described the "attacks and murder of U.S. personnel" in April 2020.

3 ISIS HIDEOUTS DESTROYED IN IRAQ, COALITION SAYS

When the Army informed Melzer that his unit would be extending its foreign deployment, he began to hatch his plan.

Authorities claim he used an encrypted application to send messages to members of O9A as well as a group known as the "Rape Waffen Division." He allegedly pledged his allegiance to O9A and related sensitive information about his unit's upcoming deployment including the location, movement and security of the servicemembers.

Investigators said Melzer and his co-conspirators planned what they referred to as a "jihadi attack" on his unit.

CLICK HERE FOR THE FOX NEWS APP

Melzer purportedly told the hate group he knew he could be a casualty of the attack but wrote, "who gives a f--- ... it would be another war ... I would've died successfully ... cause another 10 year war in the Middle East would definitely leave a mark."

Melzer allegedly admitted his role in plotting the attack during a voluntary interview with military investigators and the FBI.