WHEN Hillary Clinton was eight percentage points up on Donald Trump last month, it seemed nothing, except perhaps a major national security or law-and-order emergency, which generally helps Republicans, or a health scare for Mrs Clinton, could make the race competitive. Then on September 11th Mrs Clinton collapsed on a New York street; it was later revealed that she had contracted pneumonia. On September 18th a bomb blast in Manhattan injured 31 people, for which an Afghan-American was later shot and arrested. And on September 22nd the governor of North Carolina declared a state of emergency in the city of Charlotte, after (yet another) killing of an, allegedly unarmed, black man by police sparked violent protests, including the shooting of a black protester.

Mrs Clinton is now ahead by two points, in an average of recent polls—well within the margin of error. Analysis of the polls by FiveThirtyEight, a data journalism website, gives her only a 58% chance of beating Mr Trump on November 8th.

The unforeseen disasters are not the only reason for the tightening polls. Mrs Clinton, it appears, had been benefitting from an unsustainable boost from the two party conventions in July. The Democratic gathering was a polished extravaganza; Mr Trump’s was a two-bit shambles by comparison. The race was probably always closer than her convention bump made it seem.

She has also blundered, by describing, shortly before her collapse, “half” of Mr Trump’s supporters as “deplorables … Racist, sexist, homophobic, xenophobic, Islamophobia, you name it”. If that was a logical deduction, given Mr Trump’s racist, sexist, xenophobic and Islamophobia comments and proposals, it is never a good idea for a politician to insult the electorate. Still, the three recent disasters have a potential to boost Mr Trump no whatever what Mrs Clinton makes of them, because many voters favour him on strong leadership, law-and-order and national security. Given the far greater disaster that a Trump presidency would represent, that is a dangerous dynamic.

Appreciating his opportunity, he Republican nominee quickly sought to capitalise on both Mrs Clinton’s illness and the bomb blasts.

Having previously encouraged a right-wing conspiracy theory that Mrs Clinton was at the edge of death, he suggested she was lying about the date of her pneumonia diagnosis. Naturally, he wished her a swift recovery. Yet it was “interesting”, he said, that Mrs Clinton’s doctor claimed to have diagnosed her sickness only the day before her collapse, though she had been “coughing very, very badly a week ago and even before that, if you remember.”

His response to the terrorist attacks was, again, crudely expedient. Having heard an early report of the explosion in Manhattan, shortly before speaking at a rally in Colorado, he proceeded to do his usual work of stoking fear in an electorate already shivering with exaggerated dread of terrorism. “Just before I got off the plane, a bomb went off in New York, and nobody knows exactly what’s going on, but boy, we are living in a time,” he said.

He later boasted of his acumen in having used the word “bomb” at such an early stage in the saga: “I should be a newscaster because I called it before the news.”

The violence in North Carolina is harder for Mr Trump to brag over, in part because he has recently been trying to woo black voters, who strongly favour Mrs Clinton. A poll conducted last month put his favourability rating among black voters at 0%. He has been trying to improve on that by assuring black audiences, members of one of America’s most optimistic groups, that their lives are so dire they might as well give him a shot at improving things.

“Our African American communities are absolutely in the worst shape that they’ve ever been in before, ever, ever, ever,” Mr Trump said in North Carolina on September 21st. “You take a look at the inner cities, you get no education, you get no jobs, you get shot walking down the street… I mean, honestly, places like Afghanistan are safer than some of our inner cities.”

Even setting aside the fact that slavery was pretty bad, too, this was Mr Trump’s usual nonsense. Despite their legacy of poverty and injustice, black’s lives have never been so protected, safe and prosperous in America as they are today. Moreover, if there really are many African Americans who sympathise with Mr Trump’s analysis, it is hard to imagine him making big in-roads with the community. He has previously done too much to alienate it, for example, by accusing the activist group Black Lives Matter of inciting police shootings.

Perhaps the main political effect of Mr Trump’s charm offensive was that it stopped him, in his characteristic fashion, talking up the violence in Charlotte, which was sparked by the killing of a black motorist, Keith Lamont Scott. At an appearance in Ohio on September 19th, the day before Mr Scott’s killing, Mr Trump even took the unusual step of siding with another black victim, Terence Crutcher, who was shot dead by police in Oklahoma on September 16th, though he was unarmed and had had his hands in the air. “He looked like a really good man…It looked like he did everything right,” said Mr Trump.

After the protests in Charlotte had raged for a second day, on September 22nd Mr Trump, a self-styled “law and order candidate”, struck another unusually careful note in his analysis of them. “There’s a lack of spirit between the white and the black. It’s a terrible thing that we’re witnessing,” he said on Fox television. “You have to have law and order. At the same time, you have to have a level of spirit, a level of unity.”

This was a big departure from his previous rhetoric. It was also, his post-convention struggles suggests, well-judged. Mr Trump’s core, frightened, white supporters have already picked him as the tough champion they crave. If he can convince many moderate Republicans that he is not at the same time a dangerous liability, as his current momentum suggests, he may well be on course to win.