The White House said it had no comment on the testimony from Panetta and Dempsey.

The exchange came toward the end of a hearing focused on the terrorist attack in Benghazi, and the answers initially appeared to catch McCain offguard. The White House has publicly opposed arming the rebels in Syria.

McCain pressed Panetta and Dempsey over whether they supported a plan to arm the Syrian rebels that was put forth by other members of Obama's national security team.

ADVERTISEMENT

“We do,” Panetta said at a Senate Armed Services Committee hearing on the Benghazi attack.

McCain later released a statement criticizing Obama for overruling his national security team.

"What this means is that the president overruled the senior leaders of his own national security team, who were in unanimous agreement that America needs to take greater action to change the military balance of power in Syria," he said.

"The crisis in Syria represents a graphic failure of American leadership," McCain said in the statement. "I urge the president to heed the advice of his former and current national security leaders and immediately take the necessary steps, along with our friends and allies, that could hasten the end of the conflict in Syria. The time to act is long overdue, but it is not too late.”

The administration has opposed arming the rebels in Syria because it has said the weapons could fall into the wrong hands. It has repeatedly pushed for regional powers to take the lead in resolving the crisis.

More than 60,000 people have died in the 23-month-old uprising, leading to calls from McCain and others that the Obama adminsitration has not done enough to remove the Syrian government from power.