If the president pardons U.S. servicemen accused and convicted of war crimes, you can thank one of Donald Trump’s favorite cable-news hosts.

Over the weekend, news broke that President Trump is preparing to pardon several U.S. servicemen involved in high-profile cases of gunning down civilians or killing detainees, with the White House having already ordered that the necessary paperwork be drawn up ahead of the coming Memorial Day. The news came roughly two months after Trump publicly intervened in what he called “restrictive” confinement conditions of one of the alleged war criminals.

At the heart of both these moves has been a months-long lobbying campaign by Pete Hegseth, a Fox & Friends co-host and a buddy and informal adviser of the president’s.

Since as early as January, Hegseth has repeatedly pressed the president to support the accused and convicted servicemen. Among those Hegseth—himself an Iraq War veteran and formerly the head of the conservative group Concerned Veterans for America—has advocated for is Special Operations Chief Edward Gallagher, a Navy SEAL platoon leader set to stand trial on May 28 for allegedly shooting civilians, including a school-age girl, and knifing to death a captured ISIS fighter receiving medical treatment in Iraq in 2017.

According to three people with knowledge of the situation, Hegseth had multiple private conversations on the topic with President Trump over the past four-and-a-half months, with Gallagher’s case among those he pushed. The Fox & Friends host repeatedly told Trump that the process had been “very unfair” to Gallagher, two of these sources tell The Daily Beast. Hegseth pushed the president not only to publicly help Gallagher, but since at least March has specifically advised Trump to pardon him and the other men, the sources said.

The lobbying appears to have been persuasive. The president went to bat for Gallagher on Twitter in March. And in recent weeks, Trump has at least once described the way Gallagher has been treated as “total bullshit,” according to a source with direct knowledge of the comment. With the possibility of a pardon to come, Hegseth’s behind-the-scenes work also underscores how heavily the president has relied on Fox News stars not just for support and messaging assistance but for actual counsel on policy.

Hegseth, whom Trump had previously considered for senior posts in his administration, hasn’t been alone in pushing Gallagher’s case to Trump. He’s worked privately with like-minded political figures, such as Rep. Duncan Hunter (R-CA), one of the knowledgeable sources said.

Hunter, a former Marine who served in Iraq and Afghanistan, has become one of the most vocal advocates on Capitol Hill for Gallagher and other servicemen accused of war crimes. His Twitter feed is a stream of attempts to turn Gallagher into a conservative hero, along with links to his appearances with Hegseth and other right-wing media personalities to make the case for Gallagher, and photos of his meetings to check up on the Navy SEAL and his family.

Several other lawmakers close to the president have joined along. Rep. Matt Gaetz (R-FL), a Trump confidant, co-signed a letter to the White House with Hunter in January urging the president to dismiss the charges against the SEAL chief. In March, Rep. Ralph Norman (R-SC) tweeted that he had spoken directly on the issue with Trump and thanked him for moving Gallagher to “less restrictive confinement.”

On May 8, Hunter convened a press conference on Capitol Hill after inviting his colleagues to review what he claimed was “smoking gun” video proof of Gallagher’s innocence. Hunter and fellow lawmakers said the footage—reportedly assembled from helmet cameras belonging to other members of Gallagher’s platoon—showed Gallagher tending to the wounds of a teenage Islamic State fighter. The SEAL chief is facing criminal charges based on allegations from his own men that he knifed that wounded fighter to death, posed with his corpse, and then threatened anyone who complained, in addition to accusations that he would open fire on unarmed civilians.

Gallagher’s attorney told the military news outlet Task & Purpose that a judge allowed him to show the helmet footage to lawmakers, but not to members of the media. Hunter’s office declined to comment for this story.

As of press time, the White House didn’t respond to messages seeking comment. Hegseth and Fox News, for their part, did not respond to The Daily Beast’s requests for comment either.

Unable to sign his name to a congressional letter, Hegseth has instead used his perch on Fox News to push Gallagher’s case and those of other accused vets. And he’s done it all without appearing to have ever disclosed that he was advising Trump on such matters, according to a Daily Beast review of the footage.

Hegseth and his Fox & Friends colleagues have interviewed the families of Gallagher and Maj. Mathew Golsteyn—who was charged with murdering an Afghan male detainee and burying the body rather than releasing him in 2010—often pleading with Trump to pardon the men. “These guys make tough calls in moments for most people have never been a part of in their life,” Hegseth said to Gallagher’s brother Sean in February, “and then folks in suits in Washington, D.C., they throw paper at them and accuse them of things.”

In April, Hegseth interviewed Don Brown, a defense lawyer for 1st Lt. Clint Lorance, who was convicted in 2013 of ordering the murder of two Afghan civilians who his own soldiers said posed no threat. “Mr. President, you have the greatest signature of all presidents who I have ever seen historically,” Brown begged, claiming that, as commander-in-chief, Trump has the power to “disallow” the sentence against his client. “Clint is guilty of nothing except for being a red-blooded American patriot who put his lives on the line for his country.”

In December, Hegseth floated the idea of pardoning Gallagher, saying on-air that “guys like these can be pardoned.”

On Sunday, Hegseth said on Fox & Friends Weekend that he “can’t stand” news outlets referring to the charges against Gallagher as war crimes. “These are men who went into the most dangerous places on earth with a job to defend us and made tough calls on a moment’s notice,” he said. “They’re not war criminals, they’re warriors.” In fact, he has dismissed the soldiers’ alleged crimes as simply having made “tough calls” on at least eight separate occasions this year.

Ultimately, Hegseth said on Sunday, Trump pardoning Lorance, Gallagher, Golsteyn, and others would be “heartening for guys like me and others in the service” who want a president “defending the war fighter.”

Those who have talked to Hegseth tell The Daily Beast that he strongly views current rules of engagement as too restrictive, and that that restrictive nature sets U.S. troops up for failure and to be unfairly branded as criminals or monsters in combat zones.

But not every “war fighter” in the service is eager to declare solidarity with the likes of Gallagher or Golsteyn. A former Special Forces soldier familiar with the incident said the rules of engagement are valuable and Golsteyn broke them. “[T]he idea [that] he is a Green Beret hero when he murdered a dude in cold blood and hid the evidence is not what we do,” the soldier said. “He is giving the regiment a bad name… People like him make people mistrust us.”

Another Special Forces soldier who served with the same Fort Bragg-based unit as Golsteyn told The Daily Beast that if prosecutors prove Golsteyn and Gallagher did what they were accused of, they are murderers.

“We have a set of principles,” the Green Beret said. “That is what separates us. Neither one of the guys weren't aware of the consequences of their actions.”

He continued, “Geneva Conventions provide us with ample opportunity to get rid of the enemy. They were well aware their [alleged] actions were illegal… Rules of Engagement isn’t based in philosophy, it’s based on law, which they both knew. The character of the individuals allegedly killed doesn’t change the Rules of Engagement.”

Those concerns haven’t stopped prominent figures in the Trump orbit, chief among them Hegseth, from whispering in the president’s ear about how he should support these men. And it hasn’t stopped the president from reacting favorably to their efforts.

“At the request of many, I will be reviewing the case of a ‘U.S. Military hero,’ Major Matt Golsteyn, who is charged with murder. He could face the death penalty from our own government after he admitted to killing a Terrorist bomb maker while overseas,” Trump posted to Twitter on December 16.

Near the end of this tweet, the president made sure to tag his friend’s Twitter handle: “@PeteHegseth.”

—With additional reporting from Kevin Maurer and Maxwell Tani.