Defense Secretary Ash Carter on Wednesday told Congress that the Islamic State in Iraq and Syria (ISIS) is contained tactically, but not strategically, and he has been urging U.S. allies to ramp up their efforts.

"The reality is we're at war. That's how our troops feel about it because they're taking the fight to [ISIS] every day," Carter told the Senate Armed Services Committee.

Sen. John McCain, R-Arizona, chairman of the panel, asked Carter whether he agrees with the chairman of the Joint Chiefs of Staff about ISIS not being contained.

Get Breaking News Delivered to Your Inbox

"I agree with what General Dunford said, yes," Carter replied.

Just a few weeks ago -- hours before the Nov. 13 Paris terror attacks -- President Obama said that the terrorist group was contained. "From the start, our goal has been first to contain, and we have contained them. They have not gained ground in Iraq," he told ABC News in an interview. "And in Syria, they'll come in, they'll leave. But you don't see this systematic march by ISIL across the terrain."

Last week, Gen. Joseph Dunford told the House Armed Services Committee, "We have not contained [ISIS]," but then went on to say they've been contained "tactically" in areas since 2010.

On Wednesday, Carter listed a few advances in the effort to take away control from ISIS: it has lost 900 square kilometers of territory in Syria, and Iraqi Security Forces even took back the Anbar operations center in the last 24 hours.

U.S. and local forces on the ground are building momentum against ISIS, Carter said, adding that Syrian Arab and Kurdish forces are now moving south in Syria toward ISIS's so-called capital of Raqqa.

McCain and other lawmakers on the panel demanded to know when the U.S. expects forces to retake Raqqa and Mosul, but Carter and the vice chairman of the Joint Chiefs of Staff, Gen. Paul Selva, could not give a timeline.

"I know of no expert that doesn't believe that as long as this caliphate exists in Raqqa, they are going to be able to orchestrate attacks and metastasize and maybe even move to Libya," McCain warned about implications of failing to retake ISIS's capital.

But even as Carter and Selva highlighted progress made against the terrorist group, Selva said that 40 percent of U.S. war planes return each day without having struck targets in Iraq or Syria.

GOP lawmakers on the committee blasted the administration for not offering a concrete strategy to defeat ISIS. McCain said the U.S. needs to send "several thousand additional U.S. troops" to Iraq to embed with Iraqi troops and provide additional assistance.

Carter expressed frustration at European countries that have not stepped up their efforts in the fight. He said he "personally reached out" to his counterparts in 40 countries in the anti-ISIS coalition to ask for more.

The defense secretary also blamed Congress for holding up funds and nominees for military leadership positions that he said are key in overall fight. Carter called on the committee to release a hold on $116 million for the Syrian train-and-equip program that he said is needed to provide and transport ammunition, weapons and other equipment. The Senate also needs to confirm 16 nominees, Carter said, who would fill critical leadership positions such as the secretary of the Army and undersecretaries of the Army, Navy and Air Force.

Carter's testimony came about a week after he announced that the U.S. would deploy additional special operations forces to both Iraq and Syria, including a specialized expeditionary force, which would help conduct raids. While he declined to provide additional details of that plan on Wednesday, he said the force is supposed to have an element of surprise.

"We want this expeditionary targeting force to make [ISIS] and its leaders wonder, when they go to bed at night, who's going to be coming in the window."