An Oklahoma judge denied the release of an Afghan national living in the state who had been accused of planning a terrorist attack for Election Day.

The judge ruled that there is probable cause to move to trial against Nasir Ahmad Tawhedi. The 27-year-old faces charges of providing resources to a terrorist organization and conspiracy to get firearms for an act of terrorism, according to KOCO News 5.

The FBI has stated that Tawhedi was communicating with an ISIS contact as he made his plans.

Tawhedi arrived in the U.S. in September 2021 following the U.S. withdrawal from Afghanistan. He had previously worked as a security guard for the CIA in his home country and underwent vetting for that role. He was vetted at least once more before his transfer to Oklahoma.

MAYORKAS REFUSES TO ANSWER QUESTIONS ON AFGHAN ACCUSED OF ELECTION DAY TERROR PLOT

Nasir Ahmad Tawhedi, 27

Nasir Ahmad Tawhedi is seen making the "Tawhid" gesture in a photo. (Department of Justice)

The FBI arrested Tawhedi in Oklahoma last week on charges of planning to purchase two AK-47 rifles to carry out a mass shooting as Americans went to the polls on Nov. 5. Officials say Tawhedi was in communication with a person he knew as "Malik," who was affiliated with ISIS-K, the Afghan branch of ISIS.

AFGHAN CHARGED WITH ELECTION DAY TERROR PLOT RAISES QUESTIONS, FEARS FROM LAWMAKERS: ‘THIS IS REAL'

The FBI says it tracked Tawhedi donating to an ISIS-connected charity and viewing ISIS propaganda online. A family member of Tawhedi was also arrested in Haute-Garonne, France, this week for planning a separate attack, according to the French Anti-Terrorism Prosecutor’s Office.

Nasir Ahmad Tawhedi, 27

A photo of Nasir Ahmad Tawhedi from July where he allegedly described to his daughter and another child "the rewards a martyr receives in the afterlife." (Department of Justice)

The family member in France has not been identified, but authorities say the individual was 22 years old and arrested along with two other people.

"The recent arrests in France and by the FBI's Oklahoma City field office demonstrate the importance of partnerships to detect and disrupt potential terrorist attacks. The coordination between the United States and French law enforcement contributed to these outcomes. The FBI's top priority is preventing acts of terrorism, and we are committed to working with our partners both overseas and in the United States to uncover any plots and protect our communities from violence," the FBI told Fox News Digital in a statement.

Tawhedi was planning to target Americans as they cast their ballots on Election Day. 

Tawhedi was planning to target Americans as they cast their ballots on Election Day. 

U.S. officials claimed last week that Tawhedi was vetted three times: first to work for the CIA in Afghanistan, then to come to the U.S. on Department of Homeland Security (DHS) humanitarian parole during the withdrawal and a third time when he was approved for SIV status after arriving in the U.S.

CLICK HERE TO GET THE FOX NEWS APP

President Biden's administration now admits that the third check never occurred.