WASHINGTON — Sparks flew as two hawkish Republican presidential contenders pressed top administration officials who appeared on Capitol Hill to defend the Iran nuclear deal championed by President Barack Obama.

Late in a three-hour Senate Armed Services hearing, Sen. Lindsay Graham, R-S.C., grilled Defense Secretary Ash Carter and Energy Secretary Ernest Moniz before Sen. Ted Cruz, R-Texas, sparred with Secretary of State John Kerry.

Carter and Joint Chiefs Chairman Gen. Martin Dempsey were called to discuss the military implications of the deal while the deal's architects, Kerry, Moniz and Treasury Secretary Jack Lew also appeared as witnesses.

Earlier, Dempsey and Carter acknowledged that the US' deal partner was the world's largest state sponsor of terrorism, involved in "malign activities," supporting the Assad regime in Syria and backing Hezbollah in Lebanon. Yet, the administration's top two military officials suggested the US could either stunt Iran's nuclear program with this deal or wind up in a violent confrontation — and that military options remain available, deal or no deal.

Some of the debate focused on whether military force could, instead of a deal, be used to level Iran's nuclear program instead of a deal. Graham, a former lawyer, engaged his somewhat prosecutorial style with Carter, asking whether Iran's supreme leader controls the military and whether his religious views "compel him over time to destroy Israel and attack America?"

"I don't know. I don't know the man, I only read what he says," Carter said.

"I can tell you, I do," Graham said. "I know what he wants, and if you don't know that, this is not a good deal. Could we win a war with Iran? Who wins the war between us and Iran? Who wins? Do you have any doubt who wins?

"No, the United States wins the war," Dempsey said.

"We win," Graham thundered. "Is it your testimony here that Saudi Arabia is OK with this deal and they've committed to you they're not gonna feel compelled to get a bomb because of this deal?"

Earlier in the hearing, Dempsey — in response to questions from Sen. Tom Cotton, R-Ark. — explained that a powerful roadside bomb known as an "explosively formed penetrator" killed hundreds of American troops during the Iraq war and that Iran had been was a main supplier.

Cotton turned to Kerry when Dempsey conceded Iranian Gen. Qasem Suleimani, the Quds Force and the Revolutionary Guard were mainly involved with the bombs. an Iranian army general Qasem Suleimani, as well as the Quds Force and the Revolutionary Guard Corps — which both report directly to Iran's supreme leader — were mainly involved, Cotton turned to Kerry.

Cotton asked: What would Kerry tell the "moms and dads of the over 500 American troops who were killed by an Iranian ball of fire traveling 6,000 feet per second?" Cotton asked. Cotton's asserted that the deal provides Suleimaini with sanctions relief — a detail of the deal reported by the Daily Beast — but Kerry refuted it.

Under the deal that Suleimani faces sanctions in perpetuity faces sanctions in perpetuity under the deal, and there are measures to prevent Iran from transferring weapons, Kerry said.

To the parents: "We should tell them, obviously first of all, how extraordinarily grateful we are for the service of their loved ones."

In the last questions of the hearing, Cruz picked up with Suleimani, saying the Quds Force commander had, "more blood of American service members on his hands than any living terrorist," and reasserted that the agreement would lift sanctions against Suleimani.

Cruz suggested Kerry had said: "To the families of those men and women who gave their lives, who were killed by General Suleimani, we should apologize." but Kerry corrected him.

"I said we should thank them for their extraordinary service," Kerry said. "I never said the word apologize. Please, don't distort my words."

Said Cruz: "Secretary Kerry, it is duly noted you don't apologize to the family members of the service members who were murdered by the Iranian military."

"I thank them for their extraordinary service and I would remind them that the United States of America will never take the sanctions off Qasem Suleimani," Kerry said.

As Cruz questioned Moniz, he too said Cruz had mischaracterized him his words. Cruz, citing Moniz's testimony from another hearing, said the energy secretary did not understand an what an electromagnetic pulse was.

Moniz, a physicist who negotiated the technical details of the Iran deal, said " Of course I know about the issue. I happen to know something about nuclear weapons, I know about EMPs," before Cruz cut him off.

Cruz turned to Carter: "Do you have any doubt whatsoever if an excess of $100 billion goes to Iran, that some of that money will go to Jihadists who will use it to murder Americans?"

"I can say that their malign activities, about which we're extremely concerned, are quite well-funded today," Carter said, "and it's those malign activities the rest of their conduct that makes it so important that they not also have a nuclear weapon."

Congress has until Sept. 17 to endorse or reject the pact. Rejection would prevent President Barack Obama from waiving most US-imposed sanctions on Iran.

Obama has vowed to veto any congressional rejection measure, meaning both the House and Senate would need to muster two-thirds majorities to override the president.

Twitter: @reporterjoe