The alleged scheme that led to two Washington, D.C., men being arrested on Wednesday for allegedly impersonating federal officers represents a "booming breach of national security," according to a former FBI special agent and assistant director.

Arian Taherzadeh, 40, and Haider Ali, 35, were both arrested at a luxury apartment in the Navy Yard area of Washington, D.C., during a multi-federal government agency raid of several apartment units. They were charged with false impersonation of a federal officer in a U.S. District Court on Thursday.

The men were allegedly impersonating federal officers for over two years before the FBI and other government agencies executed a search warrant at a luxury apartment in the nation's capital, involving several units, and the men were both arrested.

Federal prosecutors allege that Taherzadeh and Ali used their fake law enforcement positions to integrate with legitimate federal agents to whom they gave gifts. They also allege that the men "compromised" Secret Service personnel who have access to the White House "by lavishing gifts upon them, including rent-free living."

DC MEN ACCUSED OF POSING AS FAKE FEDS WERE 'TIPPED OFF' TO INVESTIGATION, SHIPPED EVIDENCE: FILING

Chris Swecker, a former FBI assistant director who had responsibility over all FBI criminal investigations, told Fox News Digital that the situation is a threat to national security.

"If someone can penetrate into the Secret Service by cozying up to their agents and compromising their agents and their uniformed officers, they can get to the president and the first family. They can get vital information that they need to actually get to the president and the first family," Swecker said. "That represents a booming breach of national security."

Swecker said he doesn't think the men are simply scammers, adding that they're "too well-funded."

One aspect of the scheme that specifically concerned Swecker was that the men gave Secret Service members iPhones, which he said can easily be used to gather information.

"We used to do that in undercover operations when I was active in the bureau. And then you immediately started listening in on the phone. They're dumb enough to take the phone from you. You know, it's an easy way to intercept the phone conversations," Swecker said.

DC JUDGE WANTS DEEPER PROBE OF POSSIBLE FOREIGN TIES FOR MEN WHO ALLEGEDLY IMPERSONATED FEDERAL AGENTS

Washington, D.C. Apartment

Federal law enforcement agencies enter an apartment building in Washington, D.C. (Fox News/Kelly Laco)

Swecker said someone is directing these individuals, and he called the operation "very targeted and very calculated."

In addition to getting very close with several Secret Service agents, the two men were also allegedly involved in conducting surveillance on residents.

"This appears to be very, very targeted and very calculated and it just smells like an operation to me, it smells like a deliberate, calculated, targeted operation by someone directing these two," Swecker said.

WASHINGTON D.C. MEN WHO ALLEGEDLY POSED AS FEDERAL AGENTS HAD STOCKPILE OF WEAPONS, NEW FILING SHOWS

While Swecker is hesitant to criticize the Secret Service, saying "they're good at what they do," he said that something is "lacking" with the training within the agency.

"They're good at protection, but something's lacking in their training, or are they hiring people with bad judgment?" Swecker said. "You know, this has to be looked at by the inspector general of the Secret Service."

CLICK HERE TO GET THE FOX NEWS APP

On April 6, federal law enforcement officers recovered multiple firearms as well as ammunition while executing a search warrant. According to a court filing by federal prosecutors on Wednesday morning, "numerous electronic devices" were also found, including a "significant" amount of surveillance equipment, 30 hard drives, a machine that creates and programs Personal Identification Verification cards, and blank cards with chips.

A detention hearing will continue for the two men on Monday.

A spokesperson for the Secret Service provided Fox News Digital with the following statement:

"The Secret Service has been and continues to work with our law enforcement partners on this ongoing investigation. All personnel involved in this matter are on administrative leave and are restricted from accessing Secret Service facilities, equipment and systems. The Secret Service adheres to the highest levels of professional standards and conduct and will remain in active coordination with the Departments of Justice and Homeland Security," the spokesperson said.