A good government group is alleging that Agriculture Secretary Sonny Perdue may have broken a federal law barring executive branch officials from endorsing political candidates in their official capacity.

The Washington-based Project on Government Oversight filed a complaint with the U.S. Office of Special Counsel Thursday urging it to investigate comments made by the former Georgia governor at a Belleville, Ill., town hall last week.

The target of POGO’s complaint: Perdue’s reported remarks that U.S. Rep. Mike Bost, R-Ill., “can bring the perspective of working folks in Illinois to D.C. and we need that very much so. It’s good to have him in (the House of Representatives) fighting for your interests.”

Perdue was in Illinois in his official role as agriculture secretary, POGO said, where he discussed the administration’s trade battle with China, farm subsidies and the contours of the country’s new trade deal with Canada. His appearance also appeared to coincide with a campaign event for Bost, the group said.

"While it's unclear to what extent the campaign event and the town hall overlapped, we believe that the Secretary's verbal endorsement at such a campaign event while in his official capacity and while discussing agency business may violate the Hatch Act. We believe this episode is ripe for investigation by the Office of Special Counsel," the group said in a letter to Special Counsel Henry Kerner.

The 1939 law bars executive branch officials from engaging in electoral politics while on official taxpayer business. Cabinet officials often still do participate in political events, just in a personal capacity.

Perdue spokesman Tim Murtaugh said the secretary meets with many members of Congress in D.C. and in their home districts as part of his job as ag chief.

“In Illinois, the Secretary participated in town hall-style meetings with the members of Congress and agriculture leaders at the invitation of the Congressmen - both members of the House Agriculture Committee - as part of his official duties as Secretary of Agriculture,” he said.

“The trip was similar to many others he has taken, as he has visited 46 states since taking office in April 2017, often appearing at town halls or other public meetings with members of Congress or other elected officials,” Murtaugh added.

Perdue and other Cabinet officials in recent months have fanned out across the country to stump for Republican candidates in tough races, sometimes in districts where President Donald Trump himself might not be a universally-welcomed visitor. Some have also highlighted projects that have received federal dollars from their respective agencies.

Since arriving in Washington, Perdue has continued to be a major presence in Georgia, in his official capacity as secretary of agriculture and more behind-the-scenes as a trusted confidante to Trump.