PHOENIX — Federal officials are ordering Arizona to rescind its policy of giving COVID dollars only to schools without mask mandates or face having to give back $163 million in aid.

A top aide to Gov. Doug Ducey is vowing to fight the move.

In a letter Friday, Kathleen Victorino, the deputy chief compliance officer of the U.S. Treasury Office of Recovery Programs, said it is illegal for Gov. Doug Ducey to dole out the cash Arizona is getting from the State and Local Fiscal Recovery Fund only to public schools that do not mandate that students and staff wear face coverings.

“The purpose of the SLFRF funds is to mitigate the fiscal effects stemming from the COVID-10 public health emergency, including by supporting efforts to spread the virus,’’ wrote Victorino.

She pointed out that the Centers for Disease Control and Prevention recommends universal indoor masking by all students, staff, teachers and visitors to K-12 schools. She said the CDC guidance also suggests other strategies, like limiting class sizes.

Instead, Victorino said, Arizona effectively is discouraging schools from taking those steps by withholding federal dollars.

“Accordingly, these school programs as currently structured are ineligible uses of SLFRF funds,’’ she said.

That’s only part of the problem.

While Ducey is using the loss of federal dollars as a stick to coerce schools to abandon mask mandates, he also has set aside $10 million specifically to provide $7,000 payments to parents who want to remove their children from schools that do require face coverings and send them to private and parochial schools.

That program is limited to what the governor has called “low-income students.’’ Ducey defined that as households at or below 350% of the federal poverty level, the equivalent of about $92,750 for a family of four.

Victorino said her agency has “concerns’’ about the claimed objections of benefiting low-income families and students.

She has given the state 60 days to redesign the programs to bring them into compliance with federal law. Otherwise, Victorino said, the government may take steps to recoup the dollars used illegally.

Treasury has another fiscal weapon at its disposal.

Victorino said her agency may withhold Arizona’s next installment of these federal relief dollars “until Treasury receives information that the issues described above have been adequately addressed.’’

Daniel Ruiz, the governor’s chief of staff, said Friday morning he had not yet seen the letter. But he defended how his boss is using the dollars.

“Ultimately, we’re going to challenge whatever they’ve asserted in the letter,’’ Ruiz said. He said the state has done nothing sneaky with the dollars, saying it is “above board.’’

The threat to withhold those dollars apparently has had effect on at least some school districts.

“We’re seeing more schools go to mask-optional policies,’’ Ruiz said, though he said that also has been helped by the fact that younger children are now eligible for vaccination. He said Ducey sees this as catering to what parents want.

“Parents want their kids back in the classroom,’’ he said. “They want to stop talking about masks, they want to start talking about math.’’

He said parents appreciate the option of a voucher to take their children out of public schools that do maintain the mask requirements, even in the face of a loss of federal dollars.

As it turns out, though, there haven’t been many of them.

Ducey press aide C.J. Karamargin said earlier this month that only 85 families have applied for the $7,000 vouchers, at a cost of $595,000.

But he said the balance of the $10 million the governor set aside remains available to parents even as several Arizona schools have announced plans to impose new mask mandates due to the outbreak of the omicron variant.