While President Obama seeks to take the fight to the Islamic State, he’s got a battle brewing with his own brain trust over whether to leave the door open to committing American troops to combat roles.

Obama and his top advisers stressed Wednesday that a “combat role” for U.S. troops has been ruled out.

But current and former military officials have at least pressed the president to keep his options open.

The latest voice to weigh in was retired Gen. James Mattis, former commander of U.S. Central Command, who at a House Intelligence Committee hearing on Thursday said the U.S. should not tell its enemy “what you're not going to do.”

“We have the most skillful, fiercest, and certainly the most ethical ground forces in the world. And I don’t think we should reassure the enemy in advance that they'll never face them,” Mattis said of ground troops. “I'm not saying we have to commit right now, but certainly don't pull it off the table.”

At the same hearing, former U.S. ambassador to Afghanistan and Iraq Ryan Crocker sounded a similar warning. After Obama last week compared the mission against the Islamic State to counterterrorism operations in Somalia, Crocker said he would not recommend the “Somalia model” against the Islamic State, or ISIS, if the goal is to defeat them.

The Obama administration has struggled to explain to what extent U.S. troops could be used. While preemptively nixing a “combat mission,” the White House is no longer ruling out deploying ground troops in some capacity short of that.

White House Press Secretary Josh Earnest on Wednesday said that if Joint Chiefs Chairman Gen. Martin Dempsey asks to “forward deploy” American military advisers in Iraq, "the president said he would consider it on a case-by-case basis."  

Earnest said, in that scenario, U.S. troops "would be providing tactical advice to Iraqi security forces" or be in position to call in airstrikes.

The carefully worded clarification came after Dempsey on Tuesday appeared to challenge the administration position on ground troops.

During testimony before a Senate committee, he said he might recommend U.S. ground troops if he finds the international coalition ineffective.  

"My view at this point is that this coalition is the appropriate way forward," Dempsey said. "I believe that will prove true, but if it fails to be true and if there are threats to the United States, then I of course would go back to the president and make a recommendation that may include the use of U.S. military ground forces."

Dempsey provided one example of a scenario where he might recommend U.S. ground forces, saying they could be used to help Kurdish and Iraqi forces take Mosul, now controlled by the Islamic State.

Administration officials have suggested Dempsey and the White House are on the same page, but his remarks at the time appeared to go beyond what Obama himself had said. 

At a House hearing on Thursday, Defense Secretary Chuck Hagel said civilian and military leaders are all in agreement with the president's strategy. He echoed the president's statement that U.S. forces would not have a combat mission on the ground. 

It remains unclear whether Dempsey is open to considering a full combat role for U.S. troops.

Former Defense Secretary Roberts Gates, though, made his views clear when he told CBS News that "there will be boots on the ground if there's to be any hope of success in the strategy."

Gen. Ray Odierno, Army chief of staff and former top general in Iraq, also suggested Wednesday that ground troops of some kind are necessary to defeat ISIS.

According to The New York Times, he said: “You’ve got to have ground forces that are capable of going in and rooting them out.”

He reportedly did not specify whether those troops would have to be American.