Not too long ago, Ted Cruz looked poised to win a crucial early victory in Iowa. But his polling numbers of late have not been trending in a good direction. In new poll after new poll, Cruz seems to be falling further behind Donald Trump. And at Thursday's GOP debate in Des Moines, he clearly hoped he could turn his fortunes around with a strong performance.

He didn't.

The moderators and Cruz's rivals onstage subjected him to some very uncomfortable questioning — and he didn't hold up to it all that well. Nearly all of his major vulnerabilities (except his Canadian birthplace) got ample airtime. At one point he complained about the moderators' fairness, and didn't come off well.

And Cruz couldn't land a glove on the guy he really needs to take down, Donald Trump, because Trump wasn't even there.

Now, let's not overstate how bad the night was for Cruz. He didn't have any truly major gaffes or blunders. Plus, it's not at all certain that he's even behind Trump in Iowa — the polls could be modeling turnout incorrectly, and Cruz's ground operation is thought to be far better than the billionaire's.

But in the most crucial days of Cruz's campaign yet — just when he most needs to close the sale to Iowans — he ended up having his rockiest debate of the cycle.

The moderators subjected Cruz to some very tough questioning — especially on immigration

Cruz did not have an easy time of it from the Fox News moderators — who made sure the main attack lines on Cruz got a lot of airtime. For instance, Rubio has been attacking Cruz as weak on national security, and this was echoed in several moderator questions referencing Cruz's opposition to intervention in Syria in 2013 and a vote he took to limit the NSA's surveillance powers.

Trump has also been saying Cruz is unlikable, so the moderators pointed out no senators have endorsed Cruz's campaign. They even threw salt in the wound by pointing out that "twice last year, you asked for a colleague to second a motion, a routine courtesy on the Senate floor, and no senator would do it."

At one point, Fox even showed Iowa Gov. Terry Branstad (who has been campaigning against Cruz due to the candidate's opposition to ethanol subsidies) sitting in the audience — referring to him as "the popular governor of Iowa" and making sure Iowans watching knew exactly why Branstad had been criticizing Cruz. "Why should those voters side with you over the six-term governor of the state, sir?" Cruz was asked.

But the video attack was worst of all for Cruz. Fox first showcased inconsistent statements Marco Rubio had made in the past on immigration. But when the moderators turned to Cruz, they didn't tee him up for an attack on Rubio — they instead played footage making it appear that Cruz too has been incredibly inconsistent on immigration.

On an issue Cruz sees as one of his key advantages over Rubio — appropriately, since he truly did fight to kill the immigration reform bill Rubio had co-authored — Fox seemed to be trying convince voters that, in fact, there was little difference between the two. And it brought video evidence to back that case.

Cruz looked petty when he complained about the questioning

Some candidates — like Donald Trump — can pull off complaining about the moderators without looking weak and whiny. Indeed, Cruz himself had managed to do so at a previous debate, when he mocked questioning from the CNBC's moderators to wild applause from the audience.

But early on, when moderator Chris Wallace asked Chris Christie a question about national security — and briefly name-checked a previous attack Christie had made on Cruz and Rubio — Cruz repeatedly and unsuccessfully tried to butt in with a response.

So the moderators smacked him down. "It's not my question you get a chance to respond to, it's his answer," Wallace said. When the questioning returned to Cruz, he took the opportunity to complain again:

CRUZ: "Chris, I would note that the last four questions have been 'Rand, please attack Ted. Marco, please attack Ted. Chris, please attack Ted. Jeb, please attack Ted.' [audience boos] Let me just say this--" WALLACE: "It is a debate, sir." CRUZ: "No, actually a debate is a policy issue. I would just say this: gosh, if you guys ask one more mean question I may have to leave the stage!"

Of course, Cruz's line at the end there was intended to be a humorous reference to Trump's absence, but he didn't sound like he was kidding. He came off as extremely annoyed. It wasn't a good look for the top-polling candidate onstage.

Cruz couldn't effectively hit his main rival because he wasn't there

Let's be clear about the stakes for Cruz in Iowa — if he doesn't beat Donald Trump there, his campaign is in deep trouble. Cruz's former polling lead in the state, Iowa's heavy evangelical population, and the caucus rules that make high turnout so important all mean that this state is really one that he should win.

But Trump's absence created a dynamic where it would have seemed odd for Cruz to spend a lot of time attacking him. Sure, Cruz made a little joke about Trump at the beginning but hardly mentioned him apart from that, when the Iowa caucuses are just days away and Trump has been leading polls.

This was probably the right move for Cruz — it seems odd and unsportsmanlike to keep trashing someone who's not around — but it just goes to show how Trump outfoxed him.

If Trump had been present, the two could have had an actual back and forth. But he wasn't, so they couldn't. If Trump had shown up, maybe those Fox moderators would have played video of Trump's past statements to make him look bad. But he didn't, so they didn't. By staying away, Trump won again.