On July 25th, Donald Trump and Volodymyr Zelensky, Ukraine’s newly elected President, talked by telephone. Afterward, the Ukrainian side released a summary of the conversation that seemed anodyne but, in hindsight, is telling: “Donald Trump is convinced that the new Ukrainian government will be able to quickly improve image of Ukraine, complete investigation of corruption cases, which inhibited the interaction between Ukraine and the USA.” Last week, we learned what those unnamed corruption cases are likely to be. Democrats are investigating whether Trump withheld American military aid to Ukraine in order to pressure Zelensky to dig up what Trump hoped would be damaging information about his top Democratic challenger, Joe Biden. The alleged threats by Trump, which are believed to be the focus of an unusual whistle-blower complaint by a U.S. intelligence official, have reignited calls from some Democrats for Trump’s impeachment.

It is well known in Washington that Trump has held a residual animus toward Ukraine dating back to the 2016 campaign, when the publication of a so-called black ledger of illegal payments, made under the former Ukrainian President Viktor Yanukovych, helped bring about criminal charges against Trump’s former campaign chair, Paul Manafort. (In March, Manafort was found guilty of failing to pay taxes on payments that he had received for his work as a consultant in Ukraine.) Now it seemed like Trump was raising the stakes further, asking the country’s President to open an investigation into unproven allegations against Biden and thereby lend credence to them.

That is an unwelcome, and potentially dangerous, scenario for any Ukrainian President, given the degree to which Ukraine relies on American diplomatic, economic, and military assistance. It is not just the hundreds of millions of dollars in annual aid that Kiev depends on but also American loan guarantees, economic sanctions against Russia, and diplomatic involvement in negotiating an end to the war in the Donbass. With that conflict continuing to boil, American military training and weaponry remains vital to Ukraine’s military. In 2018, the Trump Administration agreed to supply the country with anti-tank Javelin missiles.

Ending up as the open antagonist of an American President is not really an option for a Ukrainian leader. Since he took office, in May, Zelensky has made relations with the Trump Administration a priority. A forty-one-year-old comedian who played Ukraine’s President on television before entering politics, Zelensky and his advisers hoped to organize a personal meeting as soon as possible, and thought a bilateral summit in Washington might happen by the end of the summer. The fact that no such meeting materialized was the first sign that things were off to an uneasy start with Trump. The second came last month, when Trump personally held up two hundred and fifty million dollars in American aid for Ukraine and released it only under the threat of an embarrassing vote in the Senate that would have forced him to do so.

A decisive sticking point appears to be Trump’s political interest in resurfacing old allegations connected to the business dealings of Hunter Biden, Joe Biden’s son, in Ukraine. In April, 2014, Hunter accepted a lucrative seat on the board of Burisma, one of Ukraine’s largest natural-gas producers, a decision that Hunter said he made without consulting his father. (Biden and Hunter had an informal arrangement that predated Hunter’s work with Burisma and was designed to insulate Biden from questions about his son’s private dealings: Biden wouldn’t ask Hunter about his business activities, and Hunter wouldn’t tell his father about them.)

At the time, Biden was the point person in the Obama Administration for Ukraine policy, and later, in 2016, he pressed the government of the President at the time, Petro Poroshenko, to dismiss its general prosecutor, Viktor Shokin, who was seen as covering up for corrupt officials and failing to pursue high-profile graft investigations. (A 2016 story for this magazine about a pair of young Ukrainian lawmakers touched on the Shokin affair.)

To pressure Poroshenko into removing Shokin, the Obama Administration withheld a billion dollars in loan guarantees. (Ukrainians began calling Shokin “the billion-dollar man.”) In 2016, a senior official in the Obama White House said in an interview that Biden spoke to Poroshenko by phone every few weeks and communicated to him that, as far as additional loan guarantees were concerned, “You can meet every single other condition, but until you replace this guy you are not getting this money.”

Yet there is no evidence that Biden’s insistence had anything to do with his son or with Burisma—Shokin was not pursuing a Burisma-related case at the time, and thus his firing didn’t affect Hunter Biden’s legal prospects in Ukraine one way or another. Instead, it was almost certainly a reflection of Shokin’s terrible reputation among Ukrainian reformers, anti-corruption activists, and Western partners, including officials at the E.U. and I.M.F.

That didn’t stop Trump’s personal lawyer, Rudolph Giuliani, from seizing on the would-be conspiracy story as a way of damaging Biden, who may emerge as Trump’s opponent in the 2020 Presidential contest. The narrative—that Biden had Shokin fired in order to protect Hunter—gained traction in March on Fox News and other conservative media outlets. Giuliani, meanwhile, grew frustrated that the allegations weren’t getting more attention from mainstream news organizations.

All this left the new Zelensky administration, in Kiev, in an awkward position. In June, Zelensky dispatched Andriy Yermak, a lawyer and a longtime friend, to Washington for meetings with Trump Administration officials. His main task was to prepare an official visit of Zelensky to Washington, which Ukrainian officials wanted to organize as soon as possible. He met with the national-security adviser at the time, John Bolton, and also visited members of Congress.

In an interview this week, Yermak denied that any Trump Administration officials raised the prospect of a quid pro quo in which Ukraine would pursue a corruption investigation that could damage Biden in exchange for American support: “On such a political level, no one talks about these things in plain text.” Yermak said that his mission was to “change our image and for us to be seen as a new team, to explain who is Zelensky and how he differs from his predecessors.” He added, “I think the whole problem is that we are some new people who came to power. They don’t know us yet in Washington—they are still figuring us out. It’s a normal working process.”

In the course of the summer, though, Giuliani intensified his efforts to get the Zelensky administration to pursue the Burisma case, a development that could damage Biden. Yermak decided that it would be best to hear him out in person. “Why should we rely on speculation and secondhand conversations?” he asked himself. “Why don’t I just talk with Giuliani directly? I’m a fan of what he did for New York when he was mayor.”

In May, Giuliani was planning a trip to Kiev to push Ukrainian officials on Burisma and Biden, and also to argue that the publishing of the Manafort payments, in 2016, amounted to election interference. When Giuliani faced criticism for blending personal politics with official U.S. foreign policy, he cancelled his visit. Instead, Yermak and Giuliani met in Madrid. Yermak said that the question of Burisma was “raised among others, while we were discussing in general what next steps would be for President Zelensky’s new team.”