SANTA FE, N.M. (AP) — New Mexico’s Supreme Court on Wednesday delivered a major rebuke to Gov. Michelle Lujan Grisham, ruling that the Legislature deserves a leading role in how state government spends more than $1 billion in federal pandemic aid.

The high court sided unanimously with a bipartisan team of lawmakers who said that it was wrong for Lujan-Grisham to make decisions about how to spend the aid — without input from the Legislature.

Democratic state Sen. Jacob Candelaria of Albuquerque teamed up with Republican Senate minority leader Gregory Baca to initiate the constitutional clash over executive and legislative powers.

Candelaria told justices that the stakes were too high amid the coronavirus pandemic and economic turmoil to allow just one person — the governor — to determine how New Mexico spends about $1.6 billion in federal aid. He asked the court to err on the side of accountability by ensuring legislative oversight.

“These funds can be appropriated in either a transparent, public and legislative appropriations process … or they can be appropriated in a closed-door process in which only the governor may determine unilaterally how to appropriate these funds without the need for, or the inconvenience, of public debate, committee hearings or bargaining majorities in the House and Senate,” Candelaria said.

Chief Justice Michael Vigil delivered a shortly worded order that froze pandemic relief funds until legislative appropriations are made. The governor retains veto power on spending legislation.

Justices plan later to provide a written opinion, which could influence the decision making process for future federal aid.

Lujan Grisham, a Democrat running for reelection in 2022, has used the relief funds to replenish the state unemployment insurance trust, underwrite millions of dollars in sweepstakes prizes for people who got vaccinated, prop up agriculture wages amid a shortage of chile pickers and provide incentives for the unemployed to return to work. Decisions still are pending on more than $1 billion in federal relief for New Mexico.

In written court briefings, Lujan Grisham said a state Supreme Court decision nearly 50 years ago upheld the governor’s discretion over federal funding at universities and should hold true broadly regarding federal pandemic relief funds.

An additional four long-serving Democratic senators joined in the effort to rein in the governor’s spending powers.

Critics of the governor have said she was overstepped her constitutional authority, blocking the Legislature’s representation of diverse views on how to spend the pandemic relief money.

The Legislature convenes for a special session in December on political redistricting and again in January to draft a state budget.