Rudolph Giuliani, the former mayor of New York, is the currently leading the race to become the Republican candidate, which will be decided during elections early next year.
He is respected for his leadership role after the September 11 attacks in 2001, but is battling to win over conservatives.
Thompson also said it was important to keep US troops in Iraq "to stabilise that place and not have to leave with our tail between our legs."
|We Republicans who came to power in 1994 to change government - government changed us|
Ron Paul, an anti-war libertarian and Texas congressman who stunned his rivals by raising $5m for the campaign in the last three months, said he was not prepared to pledge his support for the nominee of the party.
"Not unless they're willing to end the war," he said.
When asked whether a US president should request authorisation from the US congress before launching a military strike at any future Iran nuclear weapons plant, Romney said:
"You sit down with your attorneys and tell you want you have to do," he said, before adding the president always had to act in the best interest of the United States.
Mike Huckabee, a former Arkansas governor, said he would attack Iran in a "heartbeat" if it was an immediate threat, while Ron Paul said the notion that Iran endangered the US mainland was "preposterous."
Senator John McCain pledged to consult Congress before any attack on Iran which he said "is, maybe, closer to reality than we are discussing tonight".
Iran has denied all accusations that it intends to develop nuclear weapons.
Tax or spend
The candidates also clashed on tax and spending issues with Giuliani accusing Romney of increasing taxes during his time as Massachusetts governor.
"The point is, you've got to control taxes. But I did it. He didn't," Giuliani said.
Romney shot back: "It's baloney. Mayor, you've got to check your facts. I did not increase taxes in Massachusetts. I lowered taxes."
Thompson and other Republicans criticised the explosion of federal spending in recent years and said rising budgets and deficits under George Bush, the US president, had to be brought under control.
McCain pointed to his own Republican party as the culprit. "We have to get spending under control," he said.
"We Republicans who came to power in 1994 to change government - government changed us."