WASHINGTON — President Obama’s pick to run the Pentagon was grilled Wednesday by Republicans who used his confirmation hearing to criticize White House foreign policy on every front – from battling Islamic State militants to supporting Ukraine to trying to shutter the prison at Guantanamo Bay.

Ashton Carter is on the fast track to being the president’s fourth defense secretary in six years, but despite back surgery he endured several hours of questioning by members of the Senate Armed Services Committee, now in Republican control.

Committee Chairman John McCain, R-Ariz., praised the nominee as an honest, hard-working and respected defense professional. Then he pounced on Obama’s strategy to combat Islamic State militants, who have seized territory in Iraq and Syria and have drawn worldwide condemnation for their brutal killings, including burning a Jordanian pilot alive in a cage.

McCain pointedly asked Carter what the administration’s strategy was to confront IS.

Carter said the goal was to defeat the Islamic State forces in a way that “once they are beaten they stay beaten.” In Iraq, that will be the job of the Iraqi security forces, which Carter said he understood would begin to take back territory in coming months. In Syria, the U.S. is helping build a fighting force of moderate Syrian regional forces to take on the militants.

“It doesn’t sound like a strategy to me,” McCain said. “It sounds like a series of goals.”

Sen. Lindsey Graham, R-S.C., peppered Carter with questions about U.S. policy on Syria, where civilians are dodging bullets and bombs from President Bashar Assad’s forces in the crossfire of a war that has killed more than 200,000.

“How can we train up a Free Syrian Army or send any other force into Syria if we don’t first deal with the Assad air threat?” Graham asked. “How in the world could you train somebody to go fight IS and then one day, they turn on Assad and not expect him to kill them before they get the capacity to come after him one day? How does this work without dealing with Assad?”

Carter said he agreed that IS and Assad are both problems in Syria. The forces the U.S. is supporting have the job of defeating IS, but they also need to be creating the conditions for the ouster of Assad, he said. “That’s a much more complex task, I understand that, I’m now trying to oversimplify it, but I think that’s got to be at the end of the road,” Carter said.

McCain wasn’t satisfied with that answer either.

“You really didn’t respond, in all due respect, Dr. Carter, to sending young Syrians in – training them in Saudi Arabia and sending them into Syria to be barrel-bombed by Bashar Assad,” McCain said. “I hope you will rethink your answer.”

Even though Carter faces an easy confirmation as early as next week, the 60-year-old physicist by training – and a highly regarded thinker on strategy, budgets and policy – was subjected to some four hours of questioning.