This article has been updated to include additional reporting.

Donald Trump’s idea to ban all Muslim immigrants is more than a bad idea — it would be detrimental to national security, according to the Pentagon and an extraordinary bloc of U.S. leaders across both parties who spoke out in condemnation of the GOP presidential candidate's proposal.

"Anything that bolsters ISIL's narrative and pits the United States against the Muslim faith is certainly not only contrary to our values, but contrary to our national security,” said Pentagon spokesman Peter Cook, wading into campaign politics on Tuesday, right after saying, “I'm not going to get into domestic politics.”

Pentagon and military officials usually steer clear of the road to the White House. GOP candidates, in particular, have criticized the administration for leaving out the word "Islamic" when describing the war against terrorism or extremism. But Trump’s proposal of a total ban on Muslims drew rebukes from his campaign rivals the Obama administration’s national security leaders, en masse.

In Paris, Secretary of State John Kerry said, "I would simply say that nondiscrimination and equal treatment are a pillar of not just American values but of our immigration and our admission policies in this country and the State Department remains totally committed to treating all religions with respect and without discrimination."

"As I travel around the world, it is clear to me and how both our friends and our adversaries watch and listen to the discourse in the U.S., and I believe that comments such as those that we just heard are not constructive -- and I would say that is putting it diplomatically."

House Speaker Paul Ryan said, at the Capitol, he told members to speak up against Trump's proposal. "Normally, I do not comment on what's going on in the presidential election. I will take an exception today. This is not conservatism. What was proposed yesterday is not what this party stands for. And more importantly, it's not what this country stands for. Not only are there many Muslims serving in our armed forces dying for this country, there are Muslims serving right here in the House working every day to uphold and to defend the Constitution.... I think it's incumbent upon leaders of our party like myself to stand up and defend what conservatism is and what the Republican Party stands for."

Sen. Lindsey Graham, R-S.C., said Trump’s proposal puts U.S. troops “at risk” and is the kind of sweeping policy that worries Iraqis. “If you want to make America great again, reject this without any doubt or hesitation,” Graham, a retired Air Force Reserves colonel and one of the GOP's leading voices on national security issues in Congress, said on Morning Joe. “It puts our troops and diplomats at risk over seas. I just got back from Iraq a week ago Monday, and they were worried about his behavior and statements even before this.”

“He's putting people at risk,” Graham said. “You know, again, I've been to Iraq and Afghanistan 36 times. Remember when the guy in Florida was threatening to burn the Quran? General Petraeus was really worried about this. And the enemy takes statements like this and they use it against us.”

“This helps the enemy. It puts our soldiers and diplomats at risk, it undermines the war effort, and it's ruining the Republican party. But the good news is, Joe, that most people in responsible positions are pushing back, and that is good news.”

When Trump's remarks came Monday, Department of Homeland Security Secretary Jeh Johnson was in Northern Virginia at one of his regular outreach meetings with American Muslim community leaders across the country. Earlier Monday, in an exclusive on-stage interview with Defense One, Johnson renewed his warning against vilifying Muslims, or any community, and instead said Americans should worry about suspect behaviors. But on Tuesday, Johnson removed the gloves.

“As the Secretary of Homeland Security, I have avoided responding to the political season and what candidates have said running for president,” he said, on MSNBC with Andrea Mitchell. “However, I believe that it's the responsibility of those of us in national security and homeland security when a leading candidate for office proposes something that is irresponsible, probably illegal, unconstitutional, and contrary to international law, un-American, and will actually hurt our efforts at homeland security and national security, we have to speak out.”

White House Deputy National Security Advisor Ben Rhodes, on CNN, said, “Muslim Americans have made extraordinary contributions to our country, but it's also contrary to our security, Wolf. The fact of the matter is ISIL wants to frame this as a war between the United States and Islam. And if we look like we're applying religious tests who comes into this country, we're sending a message that essentially we're embracing that frame. And that is going to make it very difficult to partner with Muslim communities here in the United States and around the world to prevent this scourge of radicalization that we need to be focused on. We should be making it harder for ISIL to portray this as a war between the United States and Islam, not easier.”

At the State Department, Kerry’s spokesman, retired Rear Adm. John Kirby, offered the reaction perhaps most relatable to U.S. troops. Kirby was Pentagon press secretary and spokesman for former Joint Chiefs Chairman Adm. Mike Mullen. “I'm not going to get up here and parse the comments by people running for office,” he began, “but what we have said repeatedly, separate and distinct from this, is that a group like ISIL -- and we saw this with Al Qaida years ago -- they certainly feed on fear. And when we're afraid, and when we act out of fear or contempt, that emboldens their narrative and their message, this idea of this grievance against the West.”

“There's no excuse," Kirby continued, "none, for violence, let me make that very clear. Terrorism has no justification or rationale. But we have seen in the past, when terrorist groups try to use these -- those kinds of divisive comments and rhetoric to fuel their own self-delusional narrative about why they are what they, and who they are and what they -- with the ideology that they try to propagate.

“So I can't predict the degree to which those comments will or will not incite recruitment and further activity by ISIL, but clearly as the secretary said, it is counterproductive and it is not helpful.”