Wednesday night's presidential debate brought out some of the best in both Donald Trump and Hillary Clinton.

Unfortunately, it also brought out the very worst in Trump, who made the chilling pronouncement that he may not accept the outcome of next month's presidential vote. "I will look at it at the time," he said. "I will keep you in suspense.''

This refusal, despite his own running mate's insistence earlier in the night that they "of course" would accept the election results, gives Americans every reason to confirm that he simply is not prepared, or even fit, to be president.

{"type":"video","title":"Dallas News Video","author_name":"Dallas News","_id":"5iYjl2NjE6DsBdkPiXJTU2pMf3xh3Ow_","provider_name":"Ooyala","html":"

","providerType":"ooyala","providerLink":"http://www.dallasnews.com/oembed","embedType":"video"}

Clinton called that "horrifying." She was not exaggerating.

It's alarming that Trump could so badly miscalculate the answer to that question. It's one thing to conclude that the FBI is corrupt, as he did, when it did not seek an indictment of Clinton over her emails. It's another to say that the media has conspired to defeat him. But it's something altogether different for a major-party nominee to refuse to commit to respecting the outcome of the presidential election.

Until that point of the debate, Trump had been remarkably subdued and on-message for most of the night. He was having his best debate of the campaign. He had calmly made his best argument — that, yes, Clinton has much experience, but it has been "bad experience."

Trump also had made compelling arguments about the Second Amendment and against abortion rights. This newspaper doesn't share his views on these issues, but Trump made arguments sure to be compelling to a large swath of voters. He strongly argued against gun control and promised to nominate Supreme Court justices who are pro-life and inclined to repeal Roe vs. Wade.

Those strong points were marred by other weak Trump moments — from his strange defense of Vladimir Putin to his awkward handling of questions about his treatment of women. But none were as damaging as his refusal to promise to abide by the results of the election.

Clinton had a strong night, particularly when talking about immigration and defending abortion rights. She was fiery in a way that she has often failed to be, and disciplined even as she repeatedly skewered her opponent. She offered a much more sophisticated view of what is happening in Mosul and in Syria that highlighted Trump's oversimplifications.

Neither candidate adequately addressed the economic insecurity many Americans are feeling. Neither offered a compelling case for how they will reach across the aisle and work with members of the losing party to move America forward.

This final debate offered Trump something he badly needed: an opportunity to change the momentum in a campaign that he is widely considered to be losing. He failed to do that, and he faces increasingly tough odds against a victory next month.

But the debate was a vast improvement for everyone involved over the ugly slugfest that was the second debate. It did give Americans a good chance to see where each candidate stands. It also should remove any doubt that Donald Trump is not ready to be leader of this great democracy.