The two front-runners in the race for the Republican presidential nomination indicated Thursday night they would back military action against Iran if the Islamic Republic was acquiring nuclear weapons and threatening Israel. Asked what would be the "trip wire" in a decision to strike Iran, Arizona Sen. John McCain replied: "If they acquire these weapons and our intelligence tells us this is a real threat to the State of Israel and other states in the region." "Iran poses one of the greatest threats to the security of the world and the Middle East," he said. Two candidates, former New York City mayor Rudy Guiliani and Rep. Tom Tancredo of Colorado, were asked if the US should come to the aid of Israel if it asked for help in an attack on Iran's nuclear facilities. Both men said they'd say "yes," provided they knew Iran was ready to strike Israel. "The reality is the use of military force against Iran would be dangerous, it would be very provocative. The only thing worse would be Iran being a nuclear power," Giuliani said. "It's the worst nightmare of the Cold War, isn't it? Nuclear weapons in the hands of an irrational person, an irrational force. Ahmadinejad is clearly irrational," he said. McCain and Giuliani, who sit atop the polls in the Republican field, joined with their eight declared competitors for the first party debate of the 2008 campaign. Both also took strong stances on the need to fight the war on terror. Giuliani used his opening question on how to put the US on the right track to say, "We should never retreat in the face of terrorism." McCain, during a discussion on the need to eliminate Osama bin Laden, said he would "follow him to the gates of hell" to capture him. In the first Democratic presidential debate a week earlier, many observers felt New York Sen. Hillary Clinton took the strongest stance on fighting terrorism. Asked what she would do in the case of another terrorist attack on an American city, she responded, "A president must move as swiftly as is prudent to retaliate." In contrast, Illinois Sen. Barack Obama, who is leading polls alongside Clinton, said intelligence about the perpetrators must be examined "so we can take potentially some action to dismantle that network." After Obama was asked to list America's three most important allies and didn't mention Israel (he was only able to discuss two, the European Union and Japan, before time ran out), moderator Brian Williams questioned him about his support for Israel. Williams explained that he brought up the Jewish state because of Obama's recent statement that "no one has suffered more than the Palestinian people." Obama clarified that the full quote was, "No one has suffered more than the Palestinian people from the failure of the Palestinian leadership to recognize Israel, renounce violence and to get serious about negotiating peace and security for the region." "Israel has long been one of our most important allies around the world. It's the only stable democracy in the Middle East. It's the linchpin of much of our efforts in the Middle East. But the United States has to get engaged in this region," he said. JTA contributed to this report.