Former House speaker Newt Gingrich cemented his place as the main rival to Mitt Romney for the Republican presidential nomination with a solid debate performance on foreign policy. Buoyed by opinion polls that gave him a four percent lead over the former Massachusetts governor, Gingrich, whose campaign had been all but written off a few months ago, came out of the blocks quickly on national security. Asked the first question on the Patriot Act, which extended counter-terrorism search and surveillance powers in the wake of the September 11, 2001 attacks, he set the tone by sounding tough and authoritative. \"I\'d look at strengthening it because I think the dangers are literally that great,\" Gingrich said, adding that there should be \"an honest understanding that all of us will be in danger for the rest of our lives.\" During a two-hour debate at DAR Constitution Hall, just a few blocks from the White House, the candidates clashed repeatedly, disagreeing on how to handle several of the main global threats to America. In one of the testiest exchanges, Texas Governor Rick Perry suggested cutting off all financial aid to strained US ally Pakistan. This drew fire from Minnesota Congresswoman Michele Bachmann, who said he was being \"highly naive\" because Al-Qaeda might obtain Pakistan\'s nuclear weapons if the United States becomes disengaged. \"These weapons could find their way out of Pakistan into New York City or into Washington DC, and a nuclear weapon could be set off in this city,\" she warned. Romney, assailed by the White House hours before the debate for a disingenuous campaign ad, launched a fierce counter-attack, accusing President Barack Obama of seeing the United States as \"just another nation with a flag.\" \"President Obama apologizes for America,\" he said. \"President Obama seems to think we\'re going to have a global century, an Asian century. I believe we have to have an American century where America leads the free world.\" It was then Perry\'s turn to attack China, the perennial scapegoat for America\'s economic woes, and he predicted that Beijing\'s communist leaders were destined for the \"ash heap of history\" for not running a \"country of virtues.\" Former Utah governor and ambassador to China Jon Huntsman had his strongest debate so far, displaying his seasoned grasp of foreign policy and clashing notably with Romney when he suggested a more rapid drawdown from Afghanistan. Veteran Texas Congressman Ron Paul also got plenty of airtime and although his libertarian views are outside Republican orthodoxy, he has maintained a strong and faithful following in the battle to contest the November 2012 election. But in the topsy-turvy Republican race, it is Gingrich that has emerged as the main threat to Romney, who looks like the man to beat as he has built a financial and organizational advantage founded on a slick campaign machine. Gingrich must show more staying power than Bachmann, Perry and retired pizza executive Herman Cain, who have all surged to the front of the field only to wither in the full glare of the presidential campaign spotlight. A poll of nationwide Republican voters released Tuesday by Quinnipiac University showed Gingrich leading with 26 percent support, compared to 22 percent for Romney. A CNN poll had Gingrich ahead by the same margin. In his debut as nationwide poll leader -- the important state-by-state polls show a more mixed picture -- Gingrich risked angering the Republican base by suggesting he would offer an amnesty to long-term illegal immigrants. \"If you\'ve been here 25 years and you got three kids and two grandkids, you\'ve been paying taxes and obeying the law, you belong to a local church, I don\'t think we\'re going to separate you from your family, uproot you forcefully and kick you out,\" he said. Gingrich could prove Romney\'s toughest challenge yet as he retains ties to the party establishment and is polling strongly in Iowa, the first state to vote when the Republican nomination battle begins in earnest on January 3. The 68-year-old veteran of Congress was a central figure in US politics in the 1990s, rising to become House speaker as Republicans turned the tide on 40 years of majority rule by the Democratic Party. But he fell from grace and resigned in 1998 after losing a battle of wills over a government shutdown with then president Bill Clinton. The confessed adulterer has divorced twice and left his first wife following her treatment for cancer -- actions seen as potentially fatal to his chances of winning over social conservatives, a key Republican voting bloc. Gingrich\'s campaign was almost over before it started when staff walked out en masse in June as he went on a Greek cruise vacation with his wife. The candidate, in unusually jovial form after Tuesday night\'s debate, paraphrased writer Mark Twain\'s famous line, saying: \"The reports of my death were premature.\"