With the International Atomic Energy Agency warning in a new report that Iran may be proceeding with developing a nuclear weapon, the leading Republican candidates for president accused President Obama of not being forceful enough to prevent that from happening.

At the first GOP debate that focused on foreign policy, former Massachusetts governor Mitt Romney and former House speaker Newt Gingrich indicated that if either of them were commander in chief, they would be willing to use military force against Iran, if tightened economic sanctions and support for the Iranian opposition did not work to deter nuclear weapons development in the country.

“If all else fails, if after all of the work we’ve done, there’s nothing else we could do besides take military action. Then of course you take military action,” Romney said.

Gingrich agreed: “If in the end, despite all of those things, the dictatorship persists, you have to take whatever steps are necessary to break its capacity to have a nuclear weapon.”

Former Godfather’s Pizza chief executive Herman Cain said he would assist the opposition, but “would not entertain military opposition.”

Texas Gov. Rick Perry said he would impose economic sanctions on Iran’s central bank — a move the Obama administration has backed away from, for fear of the economic damage that might occur if it disrupted international oil markets.

The report issued last week by the IAEA, which is the U.N. nuclear watchdog agency, suggested that Iran has been conducting secret experiments “relevant to the development of the nuclear device.”

It is the most detailed and alarming analysis yet of the regime’s efforts, and the Obama administration is considering imposing sanctions on Iran as a result; Iran has called the report a fabrication.

The debate at Wofford College was the 10th among the GOP contenders since May. It was sponsored by CBS News and National Journal.

Although the candidates trained most of their fire on the current commander in chief, differences emerged among the Republican contenders on multiple fronts, including U.S. policy in Afghanistan and Pakistan, and on the use of harsh interrogation tactics that many have labeled torture.

Romney criticized Obama for looking to withdraw troops from Afghanistan before the end of next year, suggesting that the president’s September timetable was influenced by the election calendar.

However, former Utah governor Jon Huntsman Jr. said he would bring an immediate end to all but a small troop presence.

“I say it’s time to come home,” Huntsman said.

Huntsman, who also served as the Obama administration’s ambassador to China, added: “This nation’s future is not Afghanistan. This nation’s future is not Iraq.” The more significant focus, he said, should be preparing the United States to compete with the emerging economic powers of Asia.

On a number of issues, Rep. Ron Paul of Texas, who has long urged a more isolationist foreign policy, disagreed with the rest of the Republicans, urging the U.S. not to intervene in conflicts abroad.

Romney and Gingrich called for the U.S. government to use covert action to try to bring down the regime of Syrian President Bashar al-Assad, but Paul said, “the Syrians ought to deal with their country.”

Perry and Gingrich said the U.S. foreign aid budget should be reevaluated. In particular, they suggested they would suspend aid to Pakistan because its government has been an unreliable ally.

Cain, on the other hand, said he was uncertain whether Pakistan is friend or foe, because “there is a lot of clarity missing” in the region.

Rep. Michele Bachmann of Minnesota and former senator Rick Santorum of Pennsylvania noted that Pakistan is a nuclear power, which requires that the United States engage with it.

Some of the most intense debate occurred on the question of the interrogation tactic known as waterboarding. Huntsman and Paul called it torture, while Perry, Cain and Bachmann defended the tactic used during the George W. Bush administration.

Obama has banned waterboarding. In doing that and in calling for the closure of the prison at Guantanamo Bay, Cuba, Bachmann said, the president “is allowing the [American Civil Liberties Union] to run the [Central Intelligence Agency].”

Perry later said of waterboarding: “I will be for it until I die.”

The debate represented an opportunity for Perry to salvage his once-promising campaign after a disastrous flub during Wednesday night’s forum.

In that earlier debate held in the Detroit suburbs, Perry said he would eliminate three government departments, but could only name two of them — the Commerce and Education departments.

In one question, moderator Scott Pelley made reference to the one Perry had omitted: the Energy Department.

“I’m glad you remembered it,” Perry quipped.

When Sen. Lindsey O. Graham (R-S.C.) was given a chance to ask a question from the audience, he poked a little fun too, saying: “I’m going to ask a three-part question. I hope I remember all three parts.”

Gingrich, whose campaign had all but collapsed in June, was hoping to build on the beginnings of a revival that has vaulted him into third place in the latest polls, running close behind Cain and Romney.

For all the criticism Obama received on foreign policy during the debate, it is the subject area where the president is faring best in the view of most Americans. In the latest Washington Post-ABC News poll, 47 percent said they approved of his handling of international affairs. Six months after a team of Navy SEALs found and killed Osama bin Laden, 60 percent expressed a favorable view of how Obama is dealing with the threat of terrorism.

By comparison, only 38 percent approved of Obama’s handling of the economy — the issue that is at the top of voter concerns.