A U.S. Army soldier stationed at Fort Riley in Kansas has admitted in federal court that he distributed instructions for making bombs with the intention that his teachings would be used to commit violent crimes.

Jarrett William Smith, 24, pleaded guilty Monday in U.S. District Court to two counts of unlawfully distributing explosives information, U.S. Attorney Stephen McAllister said in a news release. Smith was a private when he transferred to Fort Riley in July. The infantry solider joined the Army in 2017.

Sentencing is scheduled for May 18, where Smith could face up to 20 years in federal prison and a fine of up to $250,000 on each count. However, the plea deal states that prosecutors and the defense will recommend three years of supervised release with no fine.

Smith used social media to advise others on how to construct improvised explosive devices, or IEDs, McAllister said. Among the explosives was a recipe for improvised napalm. Smith also told people he wanted to travel to Ukraine to fight with a violent, far-right paramilitary group.

The group was identified in court documents as the Azov Battalion.

Smith's goal was to create "chaos," and he told an FBI agent that he distributed explosives information "for the glory of his Satanist religion," the AP reported.

The grand jury indictment against Smith had included an additional charge of threatening interstate communication, alleging he threatened to burn down someone's home. The plea agreement states that the threat charge will be dismissed at sentencing.

A Federal Bureau of Investigation agent detailed the criminal investigation in court documents.

In one online conversation, Smith detailed the instructions for how to construct a cellphone detonator for an IED "in the style of the Afghans." He also detailed how to build a bomb using the heads of matches.

Smith told an FBI confidential source that he was planning an attack in the United States and was looking for more "radicals" like himself. The conversation included talks of killing members of far-left group Antifa and destroying cell towers or local news stations. He suggested using a vehicle bomb to attack the headquarters of a major American news network.

A CNN news report identified the network as the target of the proposed car bomb.

His instructions for the car bomb involved filling the car with explosive material and putting a ping pong ball full of a chemical into the gas tank. An FBI bomb technician determined Smith's instructions would not result in a viable explosive device.

In a conversation with an undercover FBI agent, Smith provided instructions for another explosive. The FBI bomb technician determined it would not be a viable explosive device. Smith told the undercover agent that the randomness of the materials would help avoid suspicion.

"That's the best way to fight people," Smith said. "Making AK-47s out of expensive parts is cool, but imagine if you will if you were going to Walmart instead of a gun store to buy weapons."

The undercover agent said he was targeting Texas politicians, including a "liberal" mayor. Smith suggested then-presidential candidate Beto O'Rourke should be targeted.

Smith provided instructions for another explosive device, which he described as a Middle East-style bomb that "can damage or destroy US military vehicles. Most of the time it can obliterate civilian vehicles and people nearby."

The FBI bomb technician determined Smith's instructions would create a viable explosive device.

Smith warned the undercover agent about a danger with that specific device:

"There have been cases where Middle Eastern insurgents built these bombs only for them to detonate prematurely because of telemarketers or people with wrong numbers who unwittingly called the devices and ended up accidentally blowing up the insurgents."

Smith was arrested the day after his conversation with the undercover agent.