WASHINGTON (Reuters) - The Trump administration illegally used national park fees to keep parks open during the 35-day government shutdown in December and January, the nonpartisan Government Accountability Office said on Thursday.

FILE PHOTO: A car drives past an entrance station, which is unmanned because of the partial government shutdown, in Arches National Park, Utah, U.S., January 9, 2019. REUTERS/George Frey/File Photo

The GAO said the Interior Department violated federal appropriations law by using entrance fees paid by visitors to national parks, which are supposed to go toward their maintenance and enhancement.

During the shutdown between Dec. 22, 2018, and Jan. 25, 2019, which was the longest in U.S. history, the Interior Department directed National Park Service staff to keep national parks accessible, keeping minimal staff on site. That raised concerns for NPS employees over public safety and resource protection.

During the shutdown, parks like Joshua Tree and Yosemite in California that remained open with limited staff faced sanitation and health issues like overflowing toilets and trash cans.

An Interior Department representative said in a statement the department’s use of the fees was “appropriate and lawful.”

“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,” the statement said.

The GAO investigation stemmed from a request from Democratic U.S. Senator Tom Udall of New Mexico and U.S. Representative Betty McCollum of Minnesota, who had raised concerns that keeping the national parks partially open was aimed at “limiting the public relations fallout” of the shutdown.

The Federal Land Recreation Enhancement Act (FLREA) requires fees collected at national parks to be used for their maintenance and improvement.

“The Administration’s decision to use these fees for basic day-to-day operations during President Trump’s shutdown is a clear violation of the law,” McCollum said in a statement.

The GAO said the Interior Department needed to report its violation to Congress and outline steps to prevent it from repeating similar violations.