History’s weirdest election just got a lot weirder last night. After a horrendous two weeks capped by the ultimate presidential candidate’s weekend from Hell, Donald Trump turned around and trounced Hillary Clinton in the second presidential debate.

As Samuel Johnson said, the prospect of a hanging can concentrate the mind — and after an opening 10 minutes in which he looked as though he was going to blow himself up with rage at Bill Clinton, Trump suddenly and surprisingly found the focus that had eluded him two weeks ago.

He came right at her — and on policy, yet. He hit her effectively on her email scandal, on the Democratic Party’s commitment to ObamaCare, on her ineffectuality as a senator when it came to changing the tax policies she claims he abuses as a wealthy person, and on the administration’s energy policies.

Clinton made a crucial choice in the early going. As Trump went after her husband for his sexual boorishness, she neither attempted to rebut him nor use his as a weapon. Instead, she echoed Michelle Obama’s claim at the Democratic convention that “when they go low, we go high.” By announcing she wasn’t going to get personal, she ceded any sharp edge in the proceedings to Trump.

Her hope was clearly that he would lose it due to her calmness. But except for two moments that were gasp-inducing in their directness — Trump saying he’d appoint a special prosecutor to go after her on the emails and later saying Hillary “has a lot of hate in her heart” — Trump did not get personal.

Her standard method of reply was to begin with a joyless little laugh that seems to be an expression of defensiveness and contempt. She would then say what he said was not true without proving it untrue, and suggested the viewers should go to her website for some good fact-checking.

And she tossed him some major softballs. When moderator Anderson Cooper brought up the leaked text of one of her secret speeches about how politicians sometimes say something different in private than in public, she went into a long disquisition about the Stephen Spielberg movie “Lincoln.” This allowed Trump to get off the best line of all the debates: “She lied. Now she’s blaming the lie on the late, great Abraham Lincoln.”

Trump, however, did say some astoundingly awful things, especially about Syria. He claimed Syria’s Bashar al-Assad (whom he said he doesn’t like) is for killing ISIS when Assad is actually busy enacting a genocide against his own people in Aleppo. And when the tough-on-Russia-and-Syria strategy outlined by his own vice presidential candidate Mike Pence in the VP debate was brought up, Trump said he hadn’t spoken to Pence about it and that he disagrees.

Hillary Clinton lost the debate because she likely figures she’s already won the election — she was ahead in every battleground state now and in all the major poll averages by around 5 percent even before the nation really takes account of the “Access Hollywood” hot mic tape — and decided to play it safe.

The prevent defense is a sound strategy when you’re ahead by two touchdowns and a field goal. Hillary isn’t there yet. Her refusal to try to deal a death blow, and Trump’s own refusal to lie down and play dead, has kept him alive to fight another day.

Unless she knows there’s something even worse coming out next …

Watch Trump and Clinton clash over tax reform at the second presidential debate: