Hunter and his wife, were charged by federal authorities in connection with using campaign funds.

Rep. Duncan Hunter, R-Calif., told a town hall audience Saturday that he took a picture of himself with a dead combatant during his military service, according to local media outlets - a potential violation of the United States' rules of warfare.

Hunter, a Marine Corps veteran, made the remarks while speaking about the case of Eddie Gallagher, the Navy SEAL chief who is accused of killing an Islamic State prisoner under his care. Gallagher, who has pleaded not guilty, also took pictures next to the slain man, according to news reports.

"Eddie did one bad thing that I'm guilty of, too - taking a picture of the body and saying something stupid," Hunter said at the meeting, about border issues in the Southern California town of Ramona, according to the Times of San Diego.

Hunter, who served two tours in Iraq and one in Afghanistan when he was on active duty (he later was deployed to Afghanistan as a reservist), said he had taken pictures "just like that when I was overseas," according to the Times. Hunter said he did share the images.

The San Diego Union-Tribune also reported that Hunter had made the remarks. The town hall was mostly focused on border security issues.

According to the Department of Defense's Law of War Manual, enemy military dead must be treated with "the same respect as would be afforded to, or expected for, friendly military dead."

"The respectful treatment of the dead is one of the oldest rules in the law of war," the manual reads. "Enemy military dead must be protected from disrespectful or degrading acts . . . posing with bodies for photographs or leaving a 'calling card' on a body are also inconsistent with the respectful treatment of the dead."

Hunter did not respond to a request for comment sent to two staffers.

The Department of Defense did not respond to a request for comment.

Hunter and his wife, Margaret Hunter, were charged last year by federal authorities in connection with using $250,000 in campaign funds to pay for family vacations and other personal expenses. Both have pleaded not guilty; the trial is set to begin later this year, according to The Associated Press.

The discussion about military treatment of foreign combatants has taken on an increased urgency in recent weeks, after President Donald Trump pardoned Michael Behenna, a former Army lieutenant who served five years in prison for the 2008 murder of an Iraqi citizen.

Gallagher's trial is scheduled to begin in early June amid speculation that Trump is considering clemency for him as well as other service members who have been accused or convicted of crimes.

Trump tweeted approvingly of Gallagher in March, announcing that he would be more amenable to a less restrictive confinement as Gallagher awaited trial, and saying it was in "honor of his past service to our Country."

Hunter has argued in support of potential clemency for Gallagher, arguing that prosecutors were out to get him to advance their careers.

"Unfortunately, Gallagher now joins Green Beret Matt Golsteyn, Navy SEAL Keith Barry and Army Lt. Clint Lorance as glaring examples of what happens when military prosecutors become more obsessed with career advancement and sensational headlines than executing the rule of law," Hunter wrote in an opinion piece for USA Today last week. "Due to the Navy's misconduct, Gallagher cannot expect to receive even a semblance of a fair trial. A pardon by Trump is fully warranted."

Hunter declined to comment about his own pending court case when asked by reporters before the meeting, the Union-Tribune reported.