The release of five Guantanamo detainees has re-ignited Sen. John McCain's intense criticism of Army Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff.

McCain on Tuesday called Dempsey’s support of the prisoner swap “shameful,” and “unacceptable conduct,” and he accused Dempsey of putting in jeopardy the military forces he oversees.

“That he wants to take action that will clearly put the lives of the men and women of which he is the chairman of the Joint Chiefs of Staff, in jeopardy,” McCain said, "it’s really shameful.”

Senate Armed Services Committee Chairman Carl Levin, D-Mich., told the Washington Examiner that Dempsey strongly endorsed the move to exchange the prisoners for the simple reason that Dempsey wanted Bowe Bergdahl out of the hands of the Taliban.

“I’ve got to put a lot of stock in that,” Levin said. “The top military people in our country supported this deal.”

McCain has taken aim at Dempsey in the recent past. In July, he temporarily blocked a Senate vote to confirm Dempsey to a second term as chair of the Joint Chiefs. At the time, McCain said he was putting a “hold” on Dempsey because of Dempsey's opposition to U.S. military intervention in Syria, where a deadly civil war rages.

McCain, who supports rebels working to overthrow the regime of President Bashar Assad, finally lifted his hold, but is still angry about it.

“Gen. Dempsey is the same guy who has been opposed to helping the resistance in Syria,” McCain said Wednesday. “Now, 160,000 people are dead.”

McCain called Dempsey “the most political chairman of the Joint Chiefs of Staff that I have ever seen in all the years I have been dealing with these people,” adding that his endorsement of the prisoner swap “is another example of, to me, unacceptable conduct.”

Levin said he disagreed with McCain’s assessment of Dempsey and called him, “an extremely good chairman of the Joint Chiefs.”