Washington (CNN) Congress' watchdog scolded the Trump administration on Thursday for violating federal law by spending money on cleaning up trash in national parks and on food stamps during the longest-ever government shutdown earlier this year.

The moves were intended by the administration to soften the blow and political pain of the partial government closure, which normally means all but some essential government functions cease.

The shutdown was triggered in December 2018 by President Donald Trump's demand that lawmakers include funding for a border wall during budget negotiations. It was resolved 35 days later, after Congress and the President agreed to temporarily reopen the government while negotiations continued.

The Government Accountability Office, a watchdog and nonpolitical arm of Congress, said the decisions violated the Antideficiency Act, which prohibits the executive government from spending money that Congress hasn't approved.

The Trump administration used funding from a special pot of visitor fee payments to clean up bathrooms and empty trash cans at national parks, which were suffering during the shutdown. Those fees are normally used for improvements to park facilities, such as creating or overhauling trails.

Read More