The Biden administration on Friday threatened to claw back more than $170 million in federal stimulus aid allotted to Arizona, after the state announced it would use the cash in a way that discouraged schools from requiring students to wear masks.

The rare demand arrived in a letter issued by the Treasury Department, which told aides to Arizona’s Republican leader, Gov. Doug Ducey, that they have 60 days to reprogram the funding in a way that befits its original intent, as an investment to combat the spread of the coronavirus.

A spokesperson for the governor did not immediately respond to a request for comment.

The dispute centers on Arizona’s portion of a $350 billion program authorized under the American Rescue Plan last year. The initiative awarded cities, counties and states a sizable chunk of cash to spend mostly as they saw fit.

Some local governments tapped their allotments to boost their economies, improve public health and address local budget concerns. Others pursued pet projects and political priorities. In Arizona, though, local legislators tapped the cash to try to carry out their ban on school mask mandates, which some districts had chosen to ignore before the state supreme court ultimately invalidated the rules in November.

One program, totaling $163 million, offered grant money to cash-strapped schools, but only if they followed all state rules — including those against requiring masks — and committed to in-person instruction.

“Safety recommendations are welcomed and encouraged — mandates that place more stress on students and families aren’t,” Ducey said in a statement in August announcing the spending. “These grants acknowledge efforts by schools and educators that are following state laws and keeping their classroom doors open for Arizona’s students.”

A second, $10 million fund provided grants to help families place their students in charter schools if their local districts resumed distance learning or required masks. “We know that historically disadvantaged communities bear the brunt of excessive and overbearing measures, and we want to ensure these students are protected,” the governor said.

The approach for months frustrated the Biden administration, which has joined medical experts globally in encouraging mask-wearing to control the spread of the coronavirus. The Treasury Department issued its first threat in October, pointing out the public health consequences of eschewing facial coverings — and the continued loss of life in the pandemic. The agency’s deputy secretary, Wally Adeyemo, specifically faulted Arizona for policies that “undermine evidence-based efforts to stop the spread of covid-19.”

While the state later explained its reasoning in a November reply, the Treasury Department on Friday said it remains concerned that Arizona’s plans are “inconsistent” with the purpose of the stimulus funds.

Kathleen B. Victorino, a top compliance officer at the agency, said Arizona had 60 days to address the issues or risk the government “initiating an action to recoup” the money — and potentially delaying the distribution of the second tranche of state-focused aid until the Treasury Department’s concerned are “adequately addressed.”