Two Donald Trump supporters from Virginia who were arrested on weapons charges near the Pennsylvania Convention Center as votes from November’s election were being tabulated are facing additional election-related charges after a preliminary hearing Thursday.

Philadelphia Municipal Court Judge Charles Hayden dropped the gun charges against Joshua Macias, 42, a cofounder of Vets for Trump, because he had a gun permit in Virginia. Prosecutors said they disagreed and intended to refile those charges.

But Hayden upheld the gun charges against codefendant Antonio LaMotta, 61, a bodyguard who had no permit. Both men were held for trial on new charges that include attempting to interfere with an election, a felony.

Hayden declined to revoke their bail, as prosecutors had requested, due to their attendance at last week’s pro-Trump rally that led to a deadly attack on the Capitol building. He did, however, bar them from attending rallies or using social media while the case is pending.

Prosecutors allege that on November 5, Macias and LaMotta drove up from Virginia, in a Hummer displaying the insignia of the QAnon conspiracy movement, with handguns, an AR-15-style rifle, 160 rounds of ammunition, and a samurai sword, to interfere in the vote counting process in Philadelphia.

» READ MORE: Two men outside Philly vote count in Hummer with QAnon stickers face weapons charges, police say

A video played in court Thursday shows Macias referring to “ballot stuffers” in “back rooms” shortly before his arrest near the Convention Center.

District Attorney Larry Krasner said in a statement Thursday that a lock-picking kit was also found in the Hummer and that Macias and Antonio were in Philadelphia “for purposes far more nefarious than sightseeing.”

“We should all be relieved and grateful that we will never know what would have happened on November 5th if it wasn’t for the quick thinking and decisive action of Philadelphia Police, acting on information from the FBI,” Krasner said. “Officers located and arrested these individuals near the Convention Center while election workers dutifully canvassed votes without interruption.”

Macias’ attorney, William J. Brennan, said Macias committed no crime.

“He certainly is not on the same side politically as the district attorney, but to charge him criminally for exercising his right of free assembly and right of free speech, that’s a very dangerous thing,” Brennan said outside the Criminal Justice Center.

LaMotta’s attorney Lauren Wimmer declined to comment Thursday.

Assistant District Attorney Andrew Wellbrock said after the hearing that prosecutors will present evidence that LaMotta and Macias were planning to disrupt the election, and wanted to stop the vote count.

They remain free on 10 percent of $750,000 bail.