He gambled just by showing up. And he appears to have won in the court of reasonable public opinion.

Voluntarily hot-seated for 5.5 gruelling hours as the grand finale of a nationally televised inquisition, Prime Minister Justin Trudeau left the Emergencies Act Inquiry Friday without serious damage to his rationale for invoking unprecedented police powers against a perceived security threat from February’s convoy occupation and border blockades.

For those of us paid to watch this prime minister, there was ample reason to be skeptical that he could survive the glare of a legal battering under oath for long without resorting to his usual fixation on reciting scripted lines instead of coherently answering significant questions.

But confronted by a lineup of lawyers representing very divergent clients, Trudeau threw away his internal Teleprompter and delivered a surprisingly relaxed, reflective and confident performance.

That’s just the optics, of course. The substance of his appearance is obviously more important. And on that score, Trudeau did well despite some nagging gaps in his answers.

True, Trudeau allowed, some of his justification for acting was in anticipation of violence, which ultimately never developed, instead of an actual threat.

The prime minister also admitted the occupation fell short of the security threat definition that Canada’s spy agency needs to unleash extraordinary powers. But, Trudeau insisted, it still met the government threshold for the move.

And Trudeau did concede that border blockades were removed even before the Emergencies Act came into force.

But under cross-examination, intervening lawyers failed to poke any major holes in the prime minister’s emergency action narrative.

The highly anticipated Trudeau showdown with the "Freedom Convoy" legal team fizzled when its lawyer squandered her precious time by reading messages from anti-vaxxers into the record, which set up Trudeau for an eloquent defence of vaccine mandates.

And the sleepy set of lawyers representing police, cities, constitutional authorities and provincial governments flat-lined the proceedings with tedious questions instead of breathing new life from the big guy’s testimony into the inquiry’s final hours.

Ultimately, Trudeau emerged as a prime minister who appeared to have done due diligence in gathering security input before being provoked to protect public safety.

Trudeau’s testimony paints the picture of a prime minister bombarded with alarms and warnings of potential security concerns to the soundtrack of airhorns blanketing downtown Ottawa and editorials thundering against federal footdragging.

Bringing in the Act does not, as some (including me) suspected, seem to have been a kneejerk do-something reaction by a cabinet that hadn’t contemplated the serious consequences of its introduction.

Trudeau noted he was acutely aware that by introducing the Act, he would end up in front of an inquiry to justify his decision as mandated by the enabling legislation.

Far from precipitating frequent uses of the Act against lesser protests, he argued, the spectacle of facing an inquiry and the risky exposure it brings to a sitting prime minister is fear factor enough to discourage its use without an airtight defence.

So now it’s over to Justice Paul Rouleau to spend a headache-filled holiday deciding if the Trudeau Government met the legislative criteria for invoking the Emergencies Act.

Armed with evidence that the RCMP wanted to keep the Act around for longer than the eight days it was in force, and with a CSIS director who enthusiastically endorsed its implementation, Trudeau had protection against any allegations he went rogue in introducing the Act before taking the stand.

But his strong performance at the inquiry is another buffer against being found personally and politically reckless in making the move.

To the largely-disinterested public, who watching the February protests dissolve in tandem with the Emergencies Act’s introduction, the ends will likely have justified the means even if Rouleau decides the federal government lacked sufficient legislative authority to invoke the Act.

In the court of public opinion, it seems, Trudeau taking the stand was a winning strategy.

That’s the bottom line.