A man who was arrested last week for allegedly spraying chemical agents at police during the Jan. 6 Capitol riot was able to enlist in the Army months later, officials said, highlighting questions over the military’s efforts to weed out recruits with extremist ties and behavior.

Spec. James Phillip Mault, 29, was taken into custody at Fort Bragg in North Carolina last week, said Col. Joe Buccino, a spokesman for the installation. Mault had enlisted in May, Buccino said, months after videos of his involvement in the riot were shared with the FBI, which interviewed Mault and his family.

It was Mault’s second time joining the active-duty Army. Currently a combat engineer, he also served from 2012 to 2016, including a deployment to Kuwait, and then served in the Army National Guard before leaving last year, Army officials said.

Mault’s charges include assaulting, resisting or impeding certain officers using a dangerous weapon or inflicting bodily injury, disorderly conduct in a Capitol building and civil disorder, according to court documents. It is unclear if he has an attorney.

Interviewed by the FBI in January, according to court papers, Mault admitted being outside when a violent mob breached the U.S. Capitol in an effort to overturn the election certification for President Biden but denied entering the building.

After Mault enlisted and passed various screening checks, he was assigned to the 3rd Brigade Combat Team of the 82nd Airborne Division. At some point, while undergoing further security checks, his alleged involvement in the riot “was flagged by our investigators,” said Lt. Col. Uriah Orland, a Pentagon spokesman. Orland said he did not yet have information about when the Defense Department became aware of that information.

Mault is at least the sixth person arrested on federal charges in connection with the riot while serving in the military, though his circumstance of enlisting afterward is unusual. The others are an active-duty Marine Corps officer and two part-time soldiers in the Army Reserve and two in the National Guard.

The riot prompted Defense Secretary Lloyd Austin in April to implement changes to how the military screens for problematic behavior in recruits and disciplines them if they hid such actions and affiliations.

Pentagon officials said at a news briefing Oct. 5 that it had implemented measures to continuously monitor personnel for security concerns, rather than screening only at specific intervals such as security clearance applications and renewals.

The monitoring is done using public records, criminal databases and financial records, and at some point will include screening social media posts, William K. Lietzau, the director of the Defense Counterintelligence and Security Agency, said at the briefing.

“The efforts at finding extremist behaviors are very much related to continuous vetting,” Lietzau said. That vetting, he said, uncovered someone “under active investigation” for potential terrorist activities in January.

The process has been used for two years and reached “full enrollment” this month, Lietzau said, and is reserved for service members after they officially join the military. Recruits who are screened before enlistment undergo different vetting.

In a statement, the Army said enlistees are subject to screening measures that include criminal background checks, sex offender databases and collection of fingerprints submitted to the FBI. “The Army was unaware of any involvement Spc. Mault may have had in the incidents on January 6 or of any information disqualifying him at the time of his enlistment,” said Lt. Col. Gabriel J. Ramirez, an Army spokesman. “The Army will continue to work with the FBI and other entities with inputs into the pre-screening process to obtain relevant information to inform Army enlistment decisions.”

Don Christensen, a former Air Force chief prosecutor, said some aspects of screening involve gray areas. For example, recruits who are persons of interest to law enforcement but have not been charged with a crime may avoid detection.

“It highlights the difficulty of saying ‘we’re not going to have extremists’ if there isn’t a public record acting in that way,” Christensen said. “The system is more reactive than proactive.”

Mault’s alleged participation in the riot became known to the FBI after tipsters identified him in videos and photographs wearing a red hard hat with distinctive stickers for the Rochester, N.Y., ironworkers union, near where Mault lived at the time, court documents said.

Imagery captured by police body cameras and phones show Mault spraying a chemical irritant like pepper spray in the direction of police officers at an eastern Capitol entrance, the documents said. It also allegedly shows him passing containers of spray to others in the crowd.

On Jan. 18, Mault’s mother told FBI investigators that her husband had driven her son and others to Washington for the Jan. 6 rally outside the White House headlined by President Donald Trump. Mault denied assaulting anyone and said he was forced by the crowd to move closer to the Capitol, an investigator wrote.

Mault helped a man exposed to chemical agents by dousing his face with water, the report said, but denied knowing the person he assisted. The FBI, however, determined that he did know the other man, Cody Mattice, who was also arrested and charged, the documents state.