A local TV news reporter asked Sean Spicer, the White House press secretary, on Tuesday whether reports of the attack made President Trump want to issue an executive order that would allow public schools to deny enrollment to undocumented immigrant children.CreditDoug Mills/The New York Times

Sean Spicer, the White House press secretary, elevated a rape case at a Maryland high school in which an undocumented immigrant has been charged to national attention on Tuesday, saying in response to a reporter’s question that it was an example of why the Trump administration was committed to a “crackdown” on illegal immigration.

The episode that led to allegations of an attack on a 14-year-old girl happened at Rockville High School last Thursday. Two students, Jose O. Montano, 17, and Henry E. Sanchez-Milian, 18, were charged the next day. Immigration officials said Mr. Sanchez, a native of Guatemala, was living in the United States illegally.

A local television news reporter asked Mr. Spicer at a news briefing on Tuesday whether reports of the attack made President Trump want to issue an executive order that would allow public schools to deny enrollment to undocumented immigrants. He used the opportunity to connect the case to the president’s restrictive immigration agenda.

“The president recognizes that education is a state-run and a local-run issue, but I think it is — it is cause for concern, what happened there,” Mr. Spicer said in a response that took nearly four minutes. “And I think that the city should look at its policies, and I think that this is something that authorities are going to have to look at.”

The case has been reported extensively by the local news media in Washington, as well as on Fox News, which has provided detailed and adjective-laden accounts of the sexual assault and used it to illustrate what it called the dangers of lenient immigration enforcement. Mr. Spicer said the case was the kind that might be addressed through Victims of Immigration Crime Enforcement, an office proposed by Mr. Trump this month.

“I think part of the reason the president has made illegal immigration and crackdown such a big deal is because of tragedies like this,” he said. “Immigration pays its toll on our people if it’s done — if it’s not done legally. And this is another example, and it’s why the president is so passionate about this.”

Image

Henry SanchezCreditMontgomery County Police Department

The police said the two suspects propositioned the 14-year-old girl for sex in a hallway at Rockville High School, a statement from the Montgomery County Police Department said. When she refused, they forced her into a boy’s bathroom and raped her in a bathroom stall, the authorities said.

School administrators called the police when they learned of the matter, and both suspects were arrested at school later that day, the police said.

Mr. Montano and Mr. Sanchez-Milian were charged on Friday with first-degree rape and first-degree sexual offense. Mr. Montano was charged as an adult. The public defender representing the two did not immediately respond to requests for comment via email and by phone on Tuesday night.

The girl has not been identified publicly. Mr. Spicer described her as an immigrant who entered the country legally. That could not be independently confirmed.

Matthew Bourke, a spokesman for United States Immigration and Customs Enforcement, said border patrol agents encountered Mr. Sanchez-Milian last August in Rio Valley Grande, Tex., and determined that he had entered the country illegally. Mr. Sanchez-Milian was issued a notice to appear before an immigration judge, but his hearing has not been scheduled, Mr. Bourke said.

On Friday, immigration officials placed a detainer on Mr. Sanchez-Milian, which will allow them to eventually take him into custody, because he was “suspected of being deportable,” Mr. Bourke said. The authorities said they could not comment on Mr. Montano’s immigration status because he is a minor.

The school district informed parents of the episode in a letter on Friday.

“The safety and security of every student in our district is our top priority and a responsibility that we do not take lightly,” Jack R. Smith, superintendent of Montgomery County Public Schools, said in a statement. “We have and will continue to work every day to ensure our schools are safe places to learn.”

Ramon Korionoff, a spokesman for the Montgomery County State’s Attorney Office, said he could not comment on the case because he did not want to prejudice potential jurors. He said he had not heard of Mr. Spicer’s press briefing until he was told by a reporter about it Tuesday.

A version of this article appears in print on , on Page A19 of the New York edition with the headline: Spicer Says Rape Case Against Undocumented Student Shows Need for Crackdown. Order Reprints | Today’s Paper | Subscribe