A 22-year-old man accused of killing a Muslim teenager with a baseball bat in Virginia on Sunday is an undocumented immigrant who entered the United States illegally, federal authorities said on Tuesday.

The man, Darwin Martinez Torres, who was charged with murder in the death of Nabra Hassanen, 17, is believed to be from El Salvador, an Immigration and Customs Enforcement spokeswoman said. The agency said it issued a so-called detainer on Monday with the Adult Detention Center in Fairfax, Va., where Mr. Martinez is being held without bail, to keep him in custody in the event that he could be released.

ICE, which said it had no previous encounters with Mr. Martinez, did not say when he came to the United States, how old he was at the time and whether he arrived with anyone else. Minors in El Salvador have fled that country in recent years, often traveling north through Mexico, to escape violent gangs. Under President Barack Obama, the White House expanded a humanitarian program to admit Central American refugees fleeing dangerous conditions.