Sen. John McCain on Wednesday slammed the Obama administration over its lack of progress against the Islamic State terror group, saying, “we are not winning this war and time is not on our side.”

McCain told Defense Secretary Ash Carter that the threat from ISIS is growing faster than the administration’s efforts or ability to counter it.

“Whatever allusions anyone may have had that our national security was not at stake in the conflict in Iraq and Syria or that ISIL was somehow contained, these attacks make it clear that ISIL’s threat against our homeland is real, direct and growing,” McCain said during a Senate Armed Services Committee hearing.

McCain pressed for more U.S. troops to be sent to stem ISIS momentum.

"There are 20,000 to 30,000 of them. They are not giants. Somebody is going to have to convince me that air power alone" is going to do the job, McCain said.

Carter resisted the idea of ramping up ground forces, instead backing a strategy of deploying special forces to assist local forces. There are currently about 3,500 U.S. troops in Iraq, and their mission is to train and advise Iraqi security forces.

"We could well turn those fighting ISIL or inclined to resist their rule into fighting us instead," he said.

Carter acknowledged that ISIS "would love nothing more than a large presence of U.S. forces on the ground in Iraq and Syria, so that they could have a call to jihad." But he said that in the long term, the U.S. would be faced with the problem of securing and governing the territory retaken -- something that needs to be done by local forces.

"So in the end, while we can enable them, we cannot substitute for them," Carter said.

Wednesday was the first time that Carter has testified before the committee since ISIS claimed responsibility for bombing a Russian airliner and attacks in Beirut and Paris and the deadly attack in San Bernardino, Calif., by a radicalized couple. 

Air Force Gen. Paul Selva, vice chairman of the Joint Chiefs of Staff, said the U.S. is not sure if Syrian democratic forces and their Kurdish partners are a big enough force to hold Raqqa if it were retaken.

Sen. Tim Kaine, D-Va., used the hearing to call on Congress to pass new war powers for the fight against ISIS. The administration is relying on authorizations for using U.S. military force that were approved after 9/11. Kaine lamented that Congress has declined to take up the issue in the 16 months the U.S. has been fighting ISIS.   

Sen. Lindsey Graham, R-S.C., who is running for the Republican presidential nomination, sought to drum up support for a new authorization that would not place limits on where, how long or in what ways the U.S. could fight ISIS.   

Carter seemed to agree with a more open-ended authorization with no geographical limits, for instance, but hedged his answer as to not contradict his own statements in support of an authorization for new war powers that President Barack Obama has sent to Congress in February -- one that included some limits on taking the fight to ISIS.   

Republican presidential candidate Ted Cruz, one of the fiercest critics of Obama's strategy to fight the militants, missed the hearing with Carter. An aide to the Texas senator, a member of the committee, said he was in New York for fundraising and media interviews.

The Associated Press contributed to this report.