At the end of the day, Jack Bauer's job was clear.

By the 24th hour of Fox's round-the-clock action drama "24," the nerve-gas threat against Los Angeles had been contained; the submarine missile attack on California had been thwarted; and there was no bringing back murdered former President Palmer, only justice to be meted out.

So what agent Bauer (series star Kiefer Sutherland) needed to do before calling it a day was extract from President Charles Logan a confession that he was at the center of all those murderous, treasonous plots.

Go no further if you don't want to know the details of this fifth-season finale, which covered 5 to 7 a.m. of the 24-hour, real-time cycle.

The fact is, Bauer's usually effective interrogation style didn't yield results with Logan. Instead, his fed-up wife, Martha (a wonderful Jean Smart), got the truth.

When the sometimes unstable First Lady began calling her husband a liar during a public observance for fallen President Palmer, Logan (played with villainous relish by Gregory Itzin) took her aside for a heated private moment.

Exploding in rage, he slapped and choked her, then, rightly concluding she wanted to bring him down, he searched her for a listening device.

"You killed David Palmer!" she screamed. "You sold nerve gas to terrorists! You're insane."

"I did it for the good of the country, as I saw it at the time!" he shouted back, then threatened her to keep silent, "or I will fill you so full of drugs you won't remember your own name."

Less than a half-hour earlier, Bauer had apprehended Logan in the presidential helicopter after it took off from Logan's California ranch.

"I suppose you want some sort of revenge," said Logan. "I understand that. Bad things happened. I didn't want them to happen. People who work for me, they went too far."

Bauer had the chopper land in a deserted industrial area, and took the handcuffed Logan into a warehouse.

From the Counter Terrorist Unit, Senior Analyst Chloe O'Brian alerted Bauer that presidential security was less than 10 minutes away.

"I don't mean to put any added pressure on you," said Chloe (Mary Lynn Rajskub), "but if you don't have a confession by then, we'll all be arrested for treason."

The interrogation began.

"Right now, right here, you are going to face justice," Bauer told the president. "And if you think for a second that I'm scared to put a bullet in your brain, you don't know me."

But after counting to three, Bauer couldn't pull the trigger. Rescue arrived. Bauer was taken into custody. Logan went free. The time was 6:24 a.m.

This was all according to plan. A few minutes later, the U.S. attorney general was listening to a recording made from a microtransmitter Bauer had planted on Logan to capture the heated exchange he would soon have with his wife.

Logan was taken away by federal marshals.

Happy ending? Not exactly. In the finale's cruel, closing moments, the triumphant Bauer was abducted by the Chinese authorities he had faked his own death to escape 18 months before — to evade their revenge for the death of the Chinese Consul.

"Kill me, just kill me," a bloodied, defeated Bauer begged his captors.

"You're far too valuable to kill, Mr. Bauer," he was told, as viewers were shown an awful sight: Bauer was imprisoned in the hold of a tanker presumably China-bound.

Thanks to Bauer, the nation was secure and an evil chief executive would pay for his crimes. But poor Jack can't look forward to getting much relief between now and next January, when "24" returns for his next rotten day.