The Interior Department broke federal spending law when it dipped into national park fees to keep its most popular sites operating during this winter’s partial federal shutdown, the Government Accountability Office concluded Thursday.

In a 17-page opinion, the GAO found that Trump administration officials violated the law by using fees parks collected under the Federal Lands Recreation Enhancement Act, which are designed to support visitor services and to fund operations and basic maintenance. This approach violated the lands law as well as the Antideficiency Act, which imposes restrictions on how agencies can redirect money without congressional approval.

At the time, National Park Service Deputy Director P. Daniel Smith said the agency needed to divert the funds because keeping parks open but understaffed was no longer tenable.

The report, which was requested by the two top Democrats on the House and Senate appropriations panels overseeing Interior, used harsh language to describe the administration’s decision to tap entrance fees during the shutdown without explicit authorization from Congress.

“Instead of carrying out the law, Interior improperly imposed its own will,” the opinion states. “Interior cannot select which restraints apply to its appropriations and when these restraints apply.”

The public watchdog, which noted that the Park Service did not respond to its request for an explanation of its actions, instructed the agency to restore the money it had diverted, report the violation to Congress and outline what actions it had undertaken to prevent another diversion from happening during a future shutdown.

Money from the fund was spent from Jan. 5 to Jan. 25; the Park Service said Friday that it had used nearly $10.3 million during that period.

“With this decision, we will consider such violations in the future to be knowing and willful violations of the Act,” the opinion says.

Interior spokeswoman Melissa Brown rejected the GAO’s legal analysis in an email. “We completely disagree with the GAO’s erroneous opinion regarding our appropriate and lawful use of FLREA funds,” she said. “The department acted well within its legal authority to clean up restrooms and pick up trash, so the American people could enjoy their national parks.”

Rep. Betty McCollum (D-Minn.) and Sen. Tom Udall (D-N.M.), who had requested the opinion, hailed the GAO’s findings.

“The Secretary of Interior seems to think the rule of law doesn’t apply to the Trump administration,” said a statement from McCollum, who chairs the House subcommittee on the Interior, environment and related agencies. “This is a clear violation of the constitution and the basic separation of powers between the executive branch and Congress.”

Udall, her Senate counterpart, said while Interior officials sought to justify the park-fee move, “their assurances at the time that their actions were legal have proven false, and there should be consequences for this violation.”