President Donald Trump's urging of Ukraine to investigate Joe Biden signaled he views the former vice president as his biggest threat in 2020.

But he made a huge miscalculation, and risked impeachment in the process.

It's true Biden is still at the top of a number of major national polls, but Sen. Elizabeth Warren is rapidly catching up to him and he's essentially frontrunner in name only.

Polls have also consistently shown Trump would lose in a head-to-head matchup with top Democratic candidates other than Biden like Warren and Sen. Bernie Sanders.

Visit Business Insider's homepage for more stories.

When President Donald Trump urged his Ukrainian counterpart to investigate Joe Biden during a July 25 phone call, the former vice president had been comfortably sitting at the top of a large field of Democratic candidates for weeks.

By pressuring Ukrainian President Volodymyr Zelensky to dig up dirt on Biden, Trump signaled he viewed the former vice president as his biggest threat in 2020. But he made a huge miscalculation, and risked impeachment in the process.

Trump seemingly wanted to gain an edge as he seeks reelection, which is ironic given the consequences of him pressuring Zelensky now pose an existential threat to his presidency.

The Ukraine scandal, which was prompted by a whistleblower complaint from an intelligence official focusing on the July 25 call, has sparked an impeachment inquiry in the House into Trump.

Though Biden's frontrunner status was solid through the spring and much of the summer, Sen. Elizabeth Warren of Massachusetts has pulled past him in a number of state and national polls in the past few weeks. Meanwhile, Biden has stumbled in his response to the Ukraine scandal, offering lukewarm defenses of his son's work for a Ukrainian natural gas company.

Read more: These are the key players you need to know to make sense of the Trump impeachment inquiry

The president urged Zelensky to investigate Biden over a baseless allegation the former vice president urged Ukraine to fire a prosecutor in order to help his son, Hunter Biden, in relation to his work for a Ukrainian natural gas company, Burisma Holdings. The prosecutor, Viktor Shokin, was widely derided for not doing enough to root out corruption and there were no active probes into Burisma when he was ousted.

There's no evidence of illegal activity on the part of either Biden, but his tentative and lackluster pushback to Trump's unfounded attacks has occurred in concert with his dwindling poll numbers and poor debate performances.

It's true Biden is still at the top of a number of major national polls, but Warren is rapidly catching up on him and he's essentially frontrunner in name only.

No definitive frontrunner has truly emerged, given the primary season isn't officially underway. There won't be a clear picture of a true frontrunner until from voters in early voting states like Iowa and New Hampshire have their say.

But Trump seems to have gone all-in on the notion Biden is the undisputed leader of the pack.

Trump underestimated Warren and Sanders

A number of Trump's top advisers have told him that he'd have an easier time defeating Warren than Biden, according to an Axios report from mid-October. But there's not much evidence to support this perception.

Polls have consistently shown Trump would lose in a head-to-head matchup with top Democratic candidates other than Biden like Warren and Sen. Bernie Sanders of Vermont.

A Fox News poll from early October, for example, found Biden and Warren would both defeat Trump by 10 points in a head-to-head matchup (50% to 40%) and Sanders by 9 points (49% to 40%). This represented the first time the top-tier Democratic candidates held a lead a hypothetical head-to-head with Trump outside the poll's margin of error.

Sanders and Warren also crushed Biden in third quarter fundraising. Sanders raised $25.3 million, Warren raised $24.6 million, and Biden $15.7 million.

In short, Trump may have succeeded in dragging Biden's campaign down with him as he gets caught up in the whirlwind of the impeachment inquiry, but it's hard to predict if that will last. And even if Biden isn't the Democratic nominee and Trump isn't impeached, there's a lot of evidence the president could still lose in November 2020 if one of the other top 2020 Democrats is on the ballot.

Nothing is guaranteed, and that's precisely why Trump made a risky gambit by fishing for dirt on a candidate with a documented record of failing in presidential elections.