SPARTANBURG, S.C. (AP) - Unsparing in their criticism of President Barack Obama, Republican presidential hopefuls disagreed in campaign debate Saturday night about the right course in Afghanistan, the use of waterboarding and the wisdom of a pre-emptive military strike to prevent Iran from gaining a nuclear weapon.
"If we re-elect Barack Obama, Iran will have a nuclear weapon. And if you elect Mitt Romney, Iran will not have a nuclear weapon," vowed the former Massachusetts governor.
On waterboarding, Herman Cain and Rep. Michele Bachmann both said they would reinstate the technique designed to simulate drowning. Cain went one step further, adding that he would leave it up to military leaders - rather than their civilian superiors - to decide what forms of interrogation amount to torture, which he said he opposes.
As for the war in Afghanistan, former Utah Gov. Jon Huntsman and Rep. Ron Paul of Texas both said it was time for U.S. troops to come home after a combat mission of 10 years duration.
While the Republicans were talking about foreign policy, Obama was on the world stage, as America's diplomat in chief.
After meeting with Russian President Dmitry Medvedev in Hawaii, he said the two men intend to "shape a common response" to new allegations that Iran has been covertly trying to build a nuclear bomb. The issue is fraught because the regime in Tehran is harshly anti-Israel, a nation the United States has pledged to defend.
If the presidential trip gave the Republicans pause, they didn't show it in a 90-minute debate.
"There are a number of ways to be smart about Iran, and a few ways to be stupid. The administration skipped all the ways to be smart," said former House Speaker Newt Gingrich.
The debate occurred less than two months before the formal selection of national convention delegates begins on Jan. 3 in the Iowa caucuses, with the race remarkably unsettled.
Romney has been at or near the top of the public opinion polls for months, while a succession of rivals vying to emerge as his principal challenger has risen and fallen in turn.
The latest soundings show Cain the current leader in that sweepstakes, although Gingrich has risen significantly in national polls in recent weeks as Perry has fallen back. And while the subject matter of defense and foreign policy didn't readily lend itself to a discussion of the principal campaign controversies, the race has had plenty of them in the past two weeks.
Cain has stoutly denied any and all charges of sexual harassment - four women have leveled accusations - while Perry embarked on an apology tour after failing in a debate Wednesday night to remember the name of the third of three Cabinet-level departments he wants to abolish.
The debate at Wofford College was crisp, and any attempts to score points off a rival lacked the personal antagonism of earlier encounters.
The tone was set at the outset, when the Republicans were asked if they would support a pre-emptive strike to prevent Iran from acquiring a nuclear weapon.
Gingrich quickly agreed with Romney, saying that if all other steps failed, "you have to take whatever steps are necessary" to prevent the Islamic regime from gaining a nuclear weapon.
Former Sen. Rick Santorum of Pennsylvania agreed. Noting that a mysterious computer virus had caused disruption inside Iran's nuclear labs, and that Iranian scientists have been killed in recent months, he said, "I hope that the U.S. has been involved" in those and other covert actions.
Paul wanted no part of a military strike. "It's not worthwhile to go to war," he said. He added said that if America's security is threatened the president must ask Congress for a formal declaration of war before taking military action.
Perry responded without answering the question. "This country can sanction the Iranian central bank right now and shut down that country's economy, and that's what the president needs to do," he said.
The United States has long had sanctions in place against Iran, and Obama's news conference in Hawaii suggested there will soon be more.
The war in Afghanistan produced the same range of responses as the question relating to Iran's nuclear ambitions - unanimous criticism of the president but differences among the Republicans seeking to take his place.
Huntsman, who served as Obama's first ambassador to China, said it was time to withdraw all U.S. troops from Afghanistan, a land where their boots first touched the soil a decade ago. "I say it's time to come home. I say this nation has achieved its key objectives," he said.
Romney and Perry said they would side with military commanders on the ground about when to withdraw troops. They criticized Obama for "telegraphing" the nation's intentions.
Yet Romney backed a timetable of a complete withdrawal by the end of 2014, the same that Obama has cited.
Obama's would-be successors differed on waterboarding, as well, the interrogation technique that former President George W. Bush authorized and Obama has banned.
While Cain and Bachmann both said they would reinstate the technique, Huntsman said use of the procedure diminishes U.S. standing in the world and Paul said it is illegal.
Romney wasn't asked directly, but said he would "use whatever means necessary to protect America."
Perry said, "This is war. That's what happens in war. I'm for using the techniques, not torture, but using those techniques that we know will extract the information to save young Americans' lives - and will be for it until I die."