Back in 2009, not long after Sgt. Bowe Bergdahl was taken prisoner in Afghanistan, Rep. Duncan D. Hunter (R-CA) signed onto a letter along with 22 other members of Congress to denounce a Fox News analyst who described the soldier as a deserter.

But this week, after President Obama negotiated an exchange to get Bergdahl back, Hunter found himself on Fox News making the same accusations he once found so detestable.

Hunter, a former Marine, joined a bipartisan group of congressional veterans five years ago in a letter demanding an apology from Fox News chairman Roger Ailes for a harsh comment about Bergdahl that aired on the cable channel.

Weeks after the soldier’s disappearance, Fox News military analyst Ralph Peters called Bergdahl an “apparent deserter” and said that, if the desertion charges against Bergdahl were true, “the Taliban can save us a lot of legal hassles and legal bills.”

Peters also condemned Bergdahl’s actions in a video released by the Taliban, claiming it showed the missing soldier “collaborating with the enemy.”

In their letter, the lawmakers slammed Peters for questioning Bergdahl’s patriotism, arguing that the soldier’s comments in the video were “being forced by his captors.”

They also called on Ailes to repudiate the “implied suggestion that the Taliban should simply kill PFC Bergdahl.” (The soldier was promoted to sergeant since his capture.)

“We demand an apology to PFC Bergdahl’s family and to the thousands of soldiers who put their lives on the line for our country,” they wrote. “As a member of the military family, Mr. Peters should measure his remarks and remember that the United States will never abandon one of its own.”

Hunter sang a very different tune during an interview with Fox News anchor Megyn Kelly on Wednesday night, backing the accounts of some of Bergdahl’s former platoon members who have accused the soldier of desertion.

The three-term congressman dismissed the notion that Bergdahl is receiving the “swift boat” treatment — a reference to the notorious smear campaign targeting John Kerry in the 2004 presidential race. Hunter said Bergdahl’s alleged actions are similar to Kerry’s protests of the Vietnam War, which have rankled conservatives for years.

As John Kerry threw his medals over the White House fence and turned his back on all of his Vietnam brothers and sisters, that’s what Bergdahl did. Bergdahl walked away from his men, and he left them in a bad spot. People lost their lives and got hurt trying to find him. But the one real commitment that you have as a military person, especially when you’re fighting and it’s dirty and you’re tired and you’re hungry, it’s not always to your flag, it’s not always for your country, it’s for the man or the woman standing next to you. And he betrayed that and that is the most sacred trust that you have in the military, whether it’s the Marine Corps, the Army, the Navy or the Air Force. It’s that trust that you have with the person next to you. That’s what he betrayed.

Hunter also defended the former members of Bergdahl’s unit who have ratcheted up the desertion charges in the days following the prisoner swap.

“And his squad mates, his platoon mates have every single right to come out and tell the American people what kind of young man Bergdahl was because they’re not very impressed by him and he just left them there,” he said.

Hunter’s spokesperson did not respond to TPM’s requests for comment on Thursday.

In a letter sent Monday to Secretary of Defense Chuck Hagel, Hunter called Bergdahl’s release “welcome news” but he questioned the White House’s claims that the POW’s deteriorating health made the situation urgent. He also decried the release of five Taliban detainees that helped secure Bergdahl’s freedom.

Hunter’s fellow California Republican, Rep. Darrell Issa, also signed the 2009 letter to Ailes. In an interview this week with San Diego-based television station KUSI, Issa said it’s up to the military to determine whether Bergdahl is a deserter.

“Because, if he was a POW first, he needs to be treated as a POW,” Issa said. “If, in fact, he was a deserter, then his incidental incarceration does not earn him many of the benefits POW’s receive.”

When the letter was sent to Ailes, Bergdahl’s disappearance was even murkier than it is now.

A Rolling Stone article by the late journalist Michael Hastings in 2012 shed more light on the situation. The piece included correspondence between Bergdahl and his father, Bob, in which the soldier was highly critical of the military. In a response to the soldier’s final message, Bob Bergdahl told his son, “OBEY YOUR CONSCIENCE!”

For some, the messages showed that the elder Bergdahl, who’s also come in for plenty of criticism this week, endorsed his son’s plan to walk off his post in Afghanistan.

The New York Times reported Thursday on a classified military report indicating that Bergdahl wandered off his assigned areas prior to his 2009 disappearance.

As evidenced by Peters’ critical assessment within a month of Bergdahl’s capture, the desertion accusations were alive and well when Hunter was denouncing them.

But nearly a week after the prisoner exchange, however, the prospect of a Republican or conservative sticking his neck out for Bergdahl is unthinkable.