Hillary Clinton was boring and exceptionally well-prepared. Donald Trump was exciting but embarrassingly undisciplined. He began with his strongest argument — that the political class represented by her has failed us and it’s time to look to a successful dealmaker for leadership — and kept to it pretty well for the first 20 minutes.

Then due to the vanity and laziness that led him to think he could wing the most important 95 minutes of his life, he lost the thread of his argument, he lost control of his temper and he lost the perspective necessary to correct these mistakes as he went.

Methodically and carefully, Hillary Clinton took over. Her purpose was to show she was rational and policy-driven, the kind of person who could be trusted to handle a careful and delicate job with prudence and sobriety — and that he was none of these things.

And she succeeded. By the end of the 95 minutes, Trump was reduced to a sputtering mess blathering about Rosie O’Donnell and about how he hasn’t yet said the mean things about Hillary that he is thinking.

Most important, he set ticking time bombs for himself over the next six weeks.

As she hammered him on his tax returns, he handed her an inestimable gift by basically saying he pays no federal taxes despite his billions — and moreover, that if he had done so, it would have been “squandered” anyway.

By the end of the 95 minutes, Trump was reduced to a sputtering mess blathering about Rosie O’Donnell and about how he hasn’t yet said the mean things about Hillary that he is thinking.

That’s not going to go away, nor is her suggestion that his refusal to release his returns is the result of his either not being as rich as he says or not being as charitable as he claims.

Clinton quoted him saying in 2006 that he hoped for a housing meltdown because it would provide buying opportunities and thereby goaded him into saying “that’s called business, by the way.” To which she quickly replied that 9 million people lost their jobs and 5 million lost their homes in the housing meltdown he was so excited about. Blammo.

His reply to Hillary’s recitation of the fact he’d begun his career settling a Justice Department lawsuit about racial discrimination in Trump housing was that there was “no admission of guilt,” which is the sort of thing the villain said at the end of “LA Law” and sounded no better in real life.

Even when he could have taken her down, he was so incompetent he didn’t go for it. A question about cybersecurity was the perfect opportunity to hammer Clinton on her outrageous mishandling of classified information.

Instead, he went into a bizarre digression in which he alternately wondered whether his son Barron might grow up to become a hacker and defended Vladimir Putin from the accusation Russia had tapped into the Democratic National Committee’s emails (which the FBI says almost certainly happened). That has to count as the biggest choke of his political life.

By the time the last 15 minutes rolled around, he was reduced to yammering about Rosie O’Donnell being mean to him and Hillary running mean commercials about him and praising himself because there are some really terrible things he could have said about Hillary but hasn’t. By this point, even his smart closing zinger — “she has experience but it’s bad experience” — was buried inside a weird word salad that reduced its effectiveness to almost nil.

His supporters should be furious with him, and so should the public in general. By performing this incompetently, by refusing to prepare properly for this exchange, by not learning enough to put meat on the bones of his populist case against Clinton, he displayed nothing but contempt for the people who have brought him this far — and for the American people who are going to make this momentous decision on Nov. 8.