The general consensus is that last night’s Republican debate, hosted by Fox Business, was a more substantive and serious affair than its predecessors. That impression may be a sort of optical illusion; the last time the candidates convened, they spent more time debating the moderators, from CNBC, than each other. And it’s a relative assessment, regardless: as long as Donald Trump remains a frontrunner for the nomination, he’ll have a place on stage, and no reasonable adult will likely confuse a Republican debate for a latter-day agora. The evening did, however, offer glimpses of a potentially functional national party, one that includes at least a couple of candidates who can acquit themselves credibly on live television.

No one, I think, had a better night than Ted Cruz, who showed more skill and sanity than his critics may have expected. Had I not covered Cruz prior to this year, I might be skeptical of both qualities too. Up to this point, he has made a relatively subdued impression on stage, and he has made common cause with some of the field’s ridiculous candidates. But his rhetorical talent and capacity for reason are undeniable. The following clip illustrates both:

The question was about entitlement reform, and Cruz’s answer begins with an awkward retread of a joke Marco Rubio made, to more endearing effect, at the CNBC debate. He quickly found his footing, though. His rebuke to Gerard Baker, the moderator—”You misstated what I’ve said on entitlement reform”—frames his answer as anodyne and soundly reasoned, regardless of what the mainstream media would have you believe. Having addressed entitlement reform, Cruz smoothly glossed over the moderator’s momentary digression—Baker had asked Cruz how his proposal would affect future retirees— skipping over a tricky issue in the process, and proceeded to offer his thoughts on immigration.

Cruz had clearly prepared for the question. His comments included a reasonably funny joke at the media’s expense. And though his analysis of the subject was necessarily short, it was shrewdly constructed. He offered a spirited defense of conservatives who oppose immigration, invoking wage effects and the longstanding Westphalian consensus against critics who would charge Republicans with bigotry. At the same time he affirmed that immigration should be understood as an economic issue, and reiterated his personal support, as the son of a legal immigrant, for legal immigration.

There was some sophistry in the answer, to be sure. The Harvard economist George Borjas, who is widely considered authoritative on the question of how immigration affects the American economy, would surely disagree with Cruz’s implication that unauthorized immigrants are the key culprit behind the “economic calamity” millions of native-born workers are facing. Though Cruz was correct to say that not all critics of immigration (or immigration reform) are bigots, he’s going to be in for a rude awakening if he thinks that none of them are, assuming he does manage to bring Trump’s supporters into his fold at some point.

Still, Cruz’s premises are reassuringly sound. Illegal immigration to the United States is, for the most part, an economic phenomenon. As I wrote in August, it’s been ominous to see so many Texas Republicans abandon that sanguine view of the subject lately; I was happy to see Cruz embrace it. It also struck me as auspicious that he corroborated a couple of conservative concerns on the subject. Barack Obama has often cast immigration reform as a moral imperative, and those of us who would like to see Congress pass comprehensive immigration reform would probably agree that America’s approach to immigration has moral implications. But a priori ethics are only going to get us so far. Illegal immigration is an economic issue, not a theological one. The conservative concerns Cruz referenced have moral implications too, and any president who wants to fix the system should be prepared to address them.

Obama took an alternative approach, and as the Fifth Circuit reminded us on Monday, it was a suboptimal one; even if the Supreme Court reverses the Fifth Circuit’s ruling, and allows Obama’s immigration program to be implemented, any presidential program is necessarily less durable than an act of Congress. With his skillful, smart performance last night, Cruz dramatized a political risk that Democrats had no real way of anticipating. If the Supreme Court does agree to take another look at DAPA, it will be early next year, at just about the time the Republican primaries reach fever pitch. Democrats may believe that the president’s executive order was morally defensible and constitutionally kosher. But Cruz, as it happens, has won this kind of argument at the Supreme Court. He can probably win it again in prime time.