WASHINGTON (AP) — The Energy Department violated federal law when it tweeted about an opinion column by Energy Secretary Rick Perry urging repeal of President Barack Obama’s health care law, a government watchdog said Thursday.

The Government Accountability Office said the July 2017 tweet was outside the scope of the agency’s approved spending but did not violate a prohibition on grassroots lobbying or propaganda.

While improper, the tweet didn’t cross over into lobbying because it did not directly appeal to the public to contact members of Congress urging the health law’s repeal, the GAO said.

Democratic Rep. Frank Pallone of New Jersey called the tweet “another example of the Trump administration’s illegal and unacceptable use of taxpayer funds for political gain.” Pallone, the top Democrat on the House energy committee, filed a complaint on the tweet last year.

A Perry spokeswoman said officials were pleased that the GAO report found that neither the tweet nor Perry’s column constituted lobbying. But she said the department “disagrees with the conclusion that DOE was in violation” of a law that limits agency spending to expenses that are “reasonably related” to its mission.

The department’s Office of General Counsel contends — and stated in its response to the GAO — “that the op-ed and tweet covered issues well within the mission of the Department of Energy,” DOE spokeswoman Shaylyn Hynes said Thursday.

The GAO report rejected that argument. “Energy did not provide any explanation or make any particularized showing that communicating about health care is part of its work or is related to accomplishing its statutory mission,” the report said.

Perry’s column was written as Congress was considering a Republican-led effort to repeal the health care law, known as the Affordable Care Act. The measure was later defeated in the Senate.

The GAO report does not penalize the Energy Department for its violation.