An Afghan national who is on the U.S. terror watchlist is back in custody Friday, the Department of Homeland Security said, after he was previously captured at the U.S.-Mexico border and released twice onto American soil. 

Mohammed Karwan is a member of Hezb-e-Islami, a group responsible for attacks in Afghanistan that killed at least nine American soldiers and civilians from 2013 to 2015, the terror watchlist indicates, NBC reported.

Karwan was first apprehended in March 2023 after crossing into the U.S. illegally near San Ysidro, California.  

DHS officials tell Fox News that Karwan was not on the terror watchlist during that arrest and was referred to ICE, which released him on ATD – alternatives to detention. At the time of his apprehension, "there was not conclusive information" to match him to the FBI’s Terrorism Watch List, the officials said.

REPUBLICAN GOVERNOR SIGNS BILL ALLOWING LOCAL AUTHORITIES TO ARREST CERTAIN MIGRANTS, ‘ENFORCE IMMIGRATION LAWS’

San Ysidro border

This aerial picture taken in September 2023 shows the U.S.-Mexico border in San Ysidro, California. Kerwan originally entered the U.S. in that area in March 2023, DHS sources say. (Sandy Huffaker/AFP via Getty Images)

Eleven months later, in February 2024, Karwan was officially added to the FBI terror watchlist after "derogatory" new information was developed on him, multiple DHS sources told Fox News. Immigration and Customs Enforcement was notified, and ICE arrested him in San Antonio in February, the sources said.

Two weeks ago, during a court appearance, DHS prosecutors did not tell the federal immigration judge that the Afghan was on the terror watchlist or a possible national threat, only arguing that he was a possible flight risk. DHS cannot disclose what they do or don’t say in court, and is limited in what the department can tell a judge, senior DHS officials told Fox News.

The judge ordered him released on bond, according to a source familiar with the matter. 

MORE THAN 40 SENATE REPUBLICANS CALL FOR MAYORKAS IMPEACHMENT TRIAL IN LETTER TO SCHUMER

Hezb-e-Islami fighter in Afghanistan

A Hezb-e-Islami soldier looks out over northern Kabul from a destroyed room of the Darulaman Palace in Afghanistan in May 1993. (Terence White/AFP/Getty Images)

As of Friday, Karwan has been taken into custody again with a court appearance set for next year. 

Homeland Security told Fox News late Thursday night that "law enforcement has been tracking the matter closely to protest against public safety risks" and "the individual is currently in U.S. custody."

"DHS takes seriously its responsibility to ensure that those who enter the country don’t pose a threat to our national security. If an individual poses a threat to national security or public safety, we deny admission, detain, remove, or refer them to other federal agencies for further vetting, investigation and/or prosecution as appropriate," a DHS spokesperson also said. "Vetting is a point-in-time check that evaluates information available to the U.S. Government at that time. If individuals who have entered the country are later found to be associated with information indicating a potential national security or public safety concern, DHS and our federal partners have procedures in place to investigate and take appropriate act."

Gulbuddin Hekmatyar in Afghanistan

Hezb-e-Islami leader Gulbuddin Hekmatyar addresses the supporters during a rally in Kabul, Afghanistan, in May 2017.

CLICK HERE TO GET THE FOX NEWS APP 

The U.S. National Counterterrorism Center describes "Hezb-e-Islami, or ‘Party of Islam,’" as a "political and paramilitary organization in Afghanistan founded in 1976 by former Afghan prime minister Gulbuddin Hekmatyar, who has been prominent in various Afghan conflicts since the late 1970s."Hezb-e Islami Gulbuddin (HIG) is an offshoot of that original Hezb-e-Islami, and is a virulently anti-Western insurgent group whose goal is to replace the Western-backed Afghan Government with an Islamic state rooted in sharia in line with Hekmatyar’s vision of a Pashtun-dominated Afghanistan," it adds. "His group conducts attacks against Coalition forces, Afghan Government targets, and Western interests in Afghanistan."

Fox News’ David Spunt and Madeleine Rivera contributed to this report.