Less than 24 hours after Mayor Bill de Blasio assured reporters that the city’s budget was crafted “with the assumption of profound challenges from Washington,” President Donald Trump announced a major one: threatening to strip billions of federal dollars from New York City.

An executive order he signed last week — which would withhold funding from “sanctuary cities” like New York — could have a direct effect on the $1.7 billion in education funding the city is expecting from the federal government in fiscal year 2018, roughly 8 percent of the education department’s overall budget.

Legal experts have argued Trump’s order is patently unconstitutional, questions loom about how much funding the president can actually withhold, and de Blasio has vowed to fight it. But education advocates said that even marginal funding reductions could harm the city’s most vulnerable students.

“The loss of funding would have a devastating impact on schools,” said Randi Levine, policy director at Advocates for Children. “The city relies on federal funding to support students with disabilities, students who are homeless, and students from low-income backgrounds.”

City and education department officials did not make budget experts available for comment, but the Independent Budget Office has identified which education programs receive the largest shares of federal funding.

Here are the ones that could be most affected:

Title I

With the city expecting roughly $709 million in direct federal funding and grants through Title I, losing that budget line would represent the biggest single potential blow to New York City’s education department. A recent analysis by the United Federation of Teachers found that decimating the program, which boosts schools that serve higher proportions of low-income students, could lead to reductions in funding at 1,265 schools (there are nearly 1,800 in the city), and cuts to after-school programs.

Free and reduced price lunch

Almost 90 percent of city spending on food programs comes from the federal government, largely through its free and reduced price lunch program, according to the most recent data released by the IBO. Roughly 80 percent of the city’s students qualify for meal assistance, and in his most recent budget proposal, de Blasio is banking on just over $300 million in federal support for the program.

Support for teachers and disadvantaged students

Nearly half of what the city spends on “instructional support” comes from the federal government, according to the IBO.

That broad category includes professional development and programs that improve teacher quality ($108 million), along with funding stemming from federal laws guaranteeing students with disabilities access to an appropriate education ($270 million). The city is also banking on $34 million from the feds to support immigrant students.

Vocational training and programs supporting homeless students

The federal government also has a smaller role in a number of other programs: career and technical high schools ($14 million), for instance, and education for homeless youth ($1.5 million).

Those might seem like trivial amounts of money in the context of a multibillion-dollar budget, Advocates for Children’s Levine acknowledged. But with the city facing other potentially significant cuts under the executive order, local officials may have to make difficult decisions about funding priorities.

“It will be harder to hold onto the education dollars we have,” Levine said, “because the city will be trying to fill all these other gaps.”