Immigration and Customs Enforcement (ICE) is disputing a claim by the San Francisco Sheriff’s Office (SFSO) for why it was denied access to the Canadian illegal immigrant accused of attacking the husband of House Speaker Nancy Pelosi — after the sheriff’s office said it turned away a person presenting as an ICE officer due to a lack of ID.

ICE sources had told Fox News earlier this month that the San Francisco Sheriff’s Office had denied ICE officials the ability to interview David DePape, who the Department of Homeland Security (DHS) had confirmed was an illegal immigrant who had initially crossed into the U.S. from Mexico on a visitor visa in 2008.

DePape is facing charges of attempted murder, residential burglary, assault with a deadly weapon, elder abuse, false imprisonment of an elder and threats to a public official and her family. He has pleaded not guilty. San Francisco is one of a number of jurisdictions that has "sanctuary" policies that forbid or limit cooperation with ICE. The state of California has also had sanctuary policies in place for years.

SFSO told Fox News last week that a person presenting themselves as an immigration official arrived at the county jail Oct. 31 seeking access to DePape for an interview. However, they said the person was denied access due to a lack of government credentials — instead saying they only presented a business card.

SAN FRANCISCO ‘SANCTUARY’ POLICIES PREVENT ICE FROM INTERVIEWING PELOSI ATTACK SUSPECT 

David DePape with stubble beard and long hair combed back

David DePape is facing several charges, including attempted murder, residential burglary, assault with a deadly weapon, elder abuse and false imprisonment of an elder. (Michael Short/San Francisco Chronicle via AP)

However, a spokesperson also said that it is the policy of the office to refuse ICE employees entry into the jail if they are engaged in civil immigration enforcement — meaning they likely would have been denied access even if they had presented a legitimate credential. 

"Our deputies do not grant ICE access to jail, and employees are not authorized to provide access to those who are conducting civil immigration enforcement," SFSO Director of Communications Tara Moriarty said.

However, an ICE official has since told Fox News Digital that the ICE agent, an Enforcement and Removal Operations deportation officer, not only attempted to conduct an in-person interview with DePape, but also had government ID.

PELOSI ATTACK SUSPECT DAVID DEPAPE THE LATEST HIGH-PROFILE CRIME INVOLVING AN ILLEGAL IMMIGRANT

"The officer identified herself and presented her government issued credentials bearing her photo, name, position and organization," the official said. "[San Francisco County Jail] denied the DO’s request to interview DePape."

In response to that statement by ICE, SFSO said it stood by its own statement and reiterated its version of events:

"A person identifying themselves as an immigration employee arrived at our jail on Monday, October 31, 2022, with a business card but no government credentials and was therefore denied access to the jail."

Jon Feere, a former ICE chief of staff during the Trump administration, said it was "standard practice" for ICE to interview jailed illegal immigrants to determine the next steps in the immigration case, and that this can provide ICE with important information.

Nancy Pelosi and Paul Pelosi award ceremony

Paul Pelosi was allegedly attacked by a man looking for his wife, House Speaker Nancy Pelosi.  (Samuel Corum/AFP via Getty Images)

"ICE is limited by what it can see in its files, and the person's circumstances may have changed since their last interaction with the federal government," he told Fox News Digital last week.

"When you're dealing with our electronic systems, ICE is seeing the fingerprints of an alien arrested by local law enforcement. But a face-to-face interview can confirm a lot of things. And the truth is, with any law enforcement situation, you never know what you're going to uncover during an interview" Feere said.

DHS has confirmed that it had issued a detainer — a request that law enforcement hold onto an illegal immigrant on release so that ICE can take them into custody — on DePape. The issue of whether ICE can interview DePape is separate from whether the detainer will be honored.

CLICK HERE TO GET THE FOX NEWS APP

SFSO had noted to Fox that the detainer would only be an issue if DePape is released from jail and said that whether that detainer would be honored is decided on a case-by-case basis.

"The sheriff reviews ICE requests on a case-by-case basis to determine whether informing ICE of Mr. DePape’s release date, if any, is consistent with our local sanctuary city ordinances," Moriarty said. "The sheriff will evaluate all information, up to the time of any release date, before making that decision."

Fox News' Bill Melugin contributed to this report.