The foreign policy debate Tuesday night was a surprise on many counts. It was lively and serious, which many debates haven’t been. Rep. Michele Bachmann (R-Minn.) exceeded expectations. Rick Santorum showed personal restraint (not complaining about the lack of attention) and displaying his depth of knowledge. As one might imagine, Herman Cain was perhaps the least comfortable man on the stage while Mitt Romney was the most at ease. Texas Gov. Rick Perry had some moments but some rather bad ones as well. The big surprise was Newt Gingrich, who not only failed to impress but created some problems for himself

Gingrich took on the illegal immigration issue, saying he wasn’t prepared to deport 11 million people already here, pointing especially to longtime residents with families. It’s an entirely sensible position, which I agree with. However, this is not going to make the base happy. It is not going to endear himself to talk radio. That he was less clumsy than Perry in defending a moderate stance on illegal immigrations goes without question, but he opened the door for Bachmann, Romney and others to pounce. (The campaign emails hitting him on this point began before the debate ended.) We’ll see how the Gingrich apologists react now that one of their bread-and-butter issues is at stake.

On other fronts, Gingrich gave some long-winded answers on Pakistan and foreign aid. He repeated the conventional wisdom among conservatives on Iran. He just didn’t stand out. In part because most of the questions came from American Enterprise Institute scholars, he couldn’t bash the moderator or the media. Without a punching bag, he seemed undistingushed. And no foreign policy debate would be complete without Gingrich wandering into a discussion of an electromagnetic pulse weapon. Now, that was pure Gingrich.

Truth be told, Gingrich sounds like he knows a lot but he didn’t show much depth or creativity tonight. And when given the opportunity to defend defense spending, he didn’t, saying we should be mining procurement for savings. (True, but will he defend defense? Not tonight.)

At the other extreme was Bachmann who was poised, informed and knowledgable throughout. She made clear that Obama’s lack of leadership is responsible for Iran’s progress on a nuclear weapon. She defended aid to Pakistan which is in our national security interest. She made an excellent point about sending our dollars to China, which in effect builds up its military at the expense of ours. She pivoted on an energy question to chide Obama for delaying on the Keystone pipeline. If she performs this well in future debates, look for her to make progress reclaiming support in Iowa.

Romney had a good night again. As in recent debates, no one laid a glove on him. He had forceful answers criticizing defense cuts, vowing to first visit Israel if elected president, brushing back Perry on the idea of a Syria no-fly zone (saying if anything with 5000 tanks we needed a “no drive zone”), and critiquing Obama’s rushed withdrawal schedule for Afghanistan. He displayed a somewhat dizzying amount of facts at times. But the message was: Here, look here, if you want the guy who can go up against Obama.

Santorum also had a strong night. He turned the conversation on the “war on terror” to a discussion of jihadism. He defended foreign aid (a smart, but not popular position). On the immigration issue he wove in his support for an economic plan focused on reviving American manufacturing. And he got Romney to agree in the closing round that we have an acute national security problem in this hemisphere. He was calmer and more presidential than he has been in past debates.

As for Cain, he was obviously operating on the most limited knowledge of any candidate. He knew enough to stay away from Perry’s no fly zone, but that was about it. He looked nervous and found no opportunity to show humor or good cheer. Expect him to continue to fall in the polls.

As for Perry he had some good moments, sounding informed on Iran and bashing Obama for turning the budget over to the debt supercommittee. (“It was a super-failure. And I think we expected that. We had a president of the United States who is not a leader. He pitched this over to them and said, here, you all figure this out.”) But he also faltered, especially when he retreated on the no-fly zone on Syria after Romney mocked it. He sounded amateurish on Pakistan, insisting we shouldn’t send them money unless they have our interests at heart. (Bachmann tried to set him straight.) He was not interested in attacking Romney, shying away from engaging on illegal immigration. He probably did no harm, but neither did he help himself.

Both Rep. Ron Paul (R-Tex.) and Jon Huntsman were predictably buffoonish, calling for pullout from Afghanistan, cuts in the military and other positions far to the left of the Obama administration.

To sum up, then, the winners tonight: Romney, Bachmann, Romney, AEI and Heritage, and Wolf Blitzer.

The losers: Cain, Huntsman, Paul.

Potential problems: Gingrich on immigration.