“I think he’s got a pretty clear pattern, doesn’t he? He usually only spends his capital on those that he views as a threat, or a challenge,” said Harold Schaitberger, president of the International Association of Firefighters, which did not endorse a candidate for president in 2016. “I think our union coming out strongly on behalf of Joe Biden, cut him short at best ... It got under his skin.”

Trump’s predawn online tirade was a precursor to a period in which Biden appeared to occupy a remarkable amount of his attention. At a May 20 rally in Pennsylvania — the state where the former vice president was born — the president laced into the candidate who was then the undisputed front-runner in the Democratic field.

“Biden deserted you,” he told the crowd at a campaign rally. “I guess he was born here, but he left you, folks. He left you for another state.”

A week later, Trump stunned even Republicans by taking to the world stage to back a foreign dictator’s harsh assessment of Biden.

“Well, Kim Jong Un made a statement that Joe Biden is a low IQ individual. He probably is, based on his record. I think I agree with him on that,” Trump said at a May 27 news conference in Tokyo.

By then, news reports had surfaced about an internal, 17-state March polling project that showed the president losing to Biden in key Rust Belt states that were essential to his 2016 victory.

Trump’s first reaction was to dismiss the revelations as fake news. His actions said otherwise. After Biden formally entered the race in late April, Trump moved to shore up his support in Pennsylvania, Wisconsin and Michigan by paying visits to those states — all of which are home to the Rust Belt workers Biden is believed to appeal to.

Yet the bad poll numbers kept coming. A June 5 Quinnipac poll even showed Biden beating Trump in Texas, a red state the president won by 9 points in 2016.

Trump grew defensive when pressed on those results.

"I don't believe those polls. There's no way [Biden] beats me in Texas,” Trump told ABC News’ George Stephanopoulos in a June 13 interview. "No, my polls show that I'm winning everywhere."

Earlier in the week, before flying to Iowa for a trip that coincided with Biden’s appearance there, Trump insisted Biden was the opponent he most preferred to run against.

“I’d rather run against Biden than anybody,” Trump told reporters on the White House lawn. “I think he’s the weakest mentally, and I like running against people that are weak mentally.”

Not long after, his campaign fired the pollsters involved in the 17-state polling project, blaming them for leaks.

The Biden campaign concluded that, based on what it knew about the reelection campaign’s well-financed, sophisticated data operation, Trump’s reaction was a sign there was likely even more bad polling data about Biden’s appeal that didn’t get a public airing.

“They test all of these different versions, and target communities and they’re getting a real clear understanding of who their voters are and what mobilizes them,” Biden campaign manager Greg Schultz said. “We think Joe Biden is the only person who can break that up, with those kinds of voters, in the battleground states.”

“Why are you punching someone?” Schultz said. “Because you’re afraid of them.”

From May to late July, Trump referred to Biden as “Sleepy Joe” at least a dozen times on Twitter alone. He also zeroed in on the size of Biden’s crowds.

“Why are you punching someone? Because you’re afraid of them.” Greg Schultz, Biden Campaign Manager

“We have thousands of people … look at the thousands and thousands of people we have,” Trump said at his Pennsylvania rally in May. “They said [Biden] had 600 people ... I’d say 150.”

The Trump campaign declined to comment for this story.

Trump’s allies insist his seeming fixation on Biden is based on factors unrelated to Biden’s performance in the polls.

Those who know the president’s quirks say he has certain issues that anger him, and one of them is that he believes his son and namesake was endlessly dragged in the media for his business dealings overseas relative to news coverage about Hunter Biden.

“He’s not scared of Joe Biden, not at all,” said Michael Caputo, who worked for Trump’s campaign and has had political clients in Russia and Ukraine.

“Hunter Biden profited from the proximity to his father and it has to infuriate President Trump that there’s no investigation, barely any media coverage,” Caputo said. “He resents the double-standard and the hypocrisy of Washington DC. He wants equal treatment.”

But one former aide to Trump’s 2016 campaign saw a different reason.

“The one thing the president is well aware of is that in his base there are a lot of Obama voters,” the aide said, alluding to what he said was the president’s perception that Biden threatened his hold on those voters. “They’re union members, they’re rank and file. A lot of those times, if they were campaigning, Obama would send Biden out there.”

In July, Biden was still very much on Trump’s mind despite the president’s engagement in numerous other controversies. On July 14, Trump unleashed a furor after tweets directed at “The Squad,” four female minority lawmakers, whom he told over Twitter to “go back” to the “totally broken and crime infested places from which they came.” The House later formally rebuked Trump for his comments.

Still, Trump found time to single out Biden for Twitter abuse at least eight times in the first two weeks of the month.

Biden disappeared from Trump’s Twitter feed for a brief period in the run-up to special prosecutor Robert Mueller's July 24 testimony before Congress. The Zelensky call, in which the president asked the Ukrainian president to investigate the Ukrainian business dealings of Biden’s son Hunter, took place the next morning.

As it turned out, Biden would loom over the entire day. Aside from the president’s request — which would ultimately spark an impeachment inquiry — Fox News released a poll that day showing Biden with a commanding 10-point lead over Trump.

And hours after the call, Trump, his top political advisers and congressional leaders gathered in the White House for an extensive campaign briefing in which Trump adviser Bill Stepien highlighted Biden as a potentially formidable threat.

Five days later, the president gave reporters a peek into his mindset on the campaign ahead.

“I am watching,” Trump said. “I think right now it will be ‘Sleepy Joe.’ I feel he’ll limp across the line.”

Marc Caputo contributed to this report.

