WASHINGTON – 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 the law governing agency spending.

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.

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.