The Republican presidential debate Tuesday on national security and foreign policy was the most riveting session yet.

It highlighted not only key differences among the eight presidential contenders over how best to counter threats to the United States, but the deep fault lines within the Republican Party itself.

The questions themselves were excellent. Pointed queries were posed in the shadow of the White House by moderator Wolf Blitzer (“Yes that is my real name,” he told us), and also by pre-selected representatives of the debate’s co-sponsors – the conservative Heritage Foundation and American Enterprise Institute.

A question by former Attorney General Ed Meese about whether America still needed the Patriot Act, which expanded the government’s ability to investigate and spy on suspected terrorists after 9/11, showed the deep divide among Republicans between national security hawks and conservative civil libertarians.

Arguing for the hawks, former House speaker Newt Gingrich, the newly minted front-runner, argued that the Patriot Act’s expanded powers were essential in a world in which terrorists sought to use nuclear and other unconventional weapons to destroy American cities. The threat, he warned, would “not end in our lifetimes.” While criminal laws were effective in prosecuting those who committed crimes, they were not likely to prevent such a deadly attack.

Ron Paul, a lone voice on this and many other issues, strongly disagreed. Championing a traditional conservative resistance to the expansion of government power at the expense of civil liberties, he called the Patriot Act “unpatriotic” because it undermines America liberty. He reminded Americans that sacrificing liberty to enhance national security ultimately risked both.

Michele Bachmann, a member of the House intelligence committee, sided with Gingrich, as did most of the other GOP contenders. Post 9/11, we lived in a very different and dangerous world, she said. President Obama, she asserted, reminding the audience that their ultimate rival was the Democratic president, resisted the need to adjust laws and preventive techniques to the new terrorist reality. He had “handed interrogation of terrorists” over to the ACLU, she asserted. “You don’t give Miranda warnings to terrorists,” she declared, referring to the constitutionally mandated warning about the right to remain silent that was given to the Christmas Day bomber who tried to blow up a plane over Detroit three years ago.

People being held and questioned about possible involvement in terrorist acts were “suspects,” not necessarily terrorists, Ron Paul shot back. Candidates were too often “careless” in their “use of words.”

The contenders were also deeply divided on the issue of illegal immigration and specifically, what to do about the millions of foreigners who have been living in the country for decades, paying taxes, obeying the law, and as Gingrich put it, belonging to a church. Should they be thrown out?

While stressing the need to control the Mexican-American border and penalizing employers who hire illegals, Gingrich said he didn’t believe that Americans favored throwing out God-fearing useful wanna-be citizens. Republicans, the “party of family,” he said, should not favor breaking up such families. He was prepared to take the “heat” for being “humane.”

But Mitt (and yes, that is his real first name, he told us) Romney disagreed. While stressing the need to set up a system for ensuring that people of talent would have priority in immigrating to America, he argued that legalizing even some of those here illegally here risked creating a “magnet” for illegal immigration.

The candidates explored and differed on a wide range of vital issues confronting America, from the war in Afghanistan and aid to Pakistan to what to do about Syria, and how to stop Iran from acquiring a nuclear bomb.

There were clearly losers Tuesday night in Washington. Herman Cain, trying to rally from allegations of sexual harassment and an embarrassing gaffe over whether he agreed with Obama’s policy towards Libya, did the best he could against such national security heavy-weight rivals. But despite noting that cyber-terror was an under-appreciated threat, he got few questions and seemed out of his depth in fielding those he was asked.

Former front- runner Rick Perry, the Texas Governor, floundered too, proposing a no-fly zone over Syria – an idea that no other contender embraced. Second-tier candidate Jon Huntsman, President Obama’s former ambassador to China, was expected to shine, given his national security and foreign policy expertise, and he did, noting for instance, that America’s goal in Afghanistan was still unclear. But he, too, was asked few questions.

The star of evening’s debate was Gingrich, a candidate with more baggage than a Pan Am lost luggage department. But nuanced and articulate, he dominated the evening, exuding experience and complexity. He also managed to resist his almost knee-jerk habit of bashing the press.

It was Romney, however, boring ol’ Mitt, who succinctly articulated how his presidency – and indeed, that of most of the GOP contenders, one suspects -- would differ in approach and policies from those of the current commander-in-chief. Whereas President Obama saw America as just another country with a flag, Romney believed in American exceptionalism. Whereas Obama saw a multi-polar world, Romney believed in American superiority. Whereas Obama saw China rising, Romney saw an American 21st century. While Obama apologized for American actions, Romney believed the world respected America for being strong.

But perhaps chastened by the loss of blood and treasure of the past decade, neither Romney nor Gingrich seemed hungry for another military confrontation, not even to stop Iran from acquiring a nuclear bomb. Both endorsed tougher sanctions against Teheran; military action as an option should be kept on the table, but a last resort. In this, they may have more in common with the president whose policies they criticize than either of them might like to acknowledge.

Judith Miller is an award-wining writer and author. She is a Fox News contributor.