KYIV, Ukraine - Four days before President Donald Trump was inaugurated in January 2017, the outgoing vice president, Joe Biden, was in Ukraine - his sixth visit in seven years - to deliver a rousing farewell speech.
"You're fighting both against the cancer of corruption, which continues to eat away at Ukraine's democracy within, and the unrelenting aggression of the Kremlin," he told local leaders, politicians and parliamentarians in Kyiv, the capital.
"It's imperative that you continue to strengthen all of your anti-corruption institutions to root out those who would return Ukraine to rule by cronyism and kleptocracy," he added.
The rousing speech reflected not only Biden's focus on driving out entrenched corruption in Ukraine, but also the Obama White House efforts to help the former Soviet republic on its difficult path to democracy.
Trump has now turned that on its head, arguing that it was Biden and his son, Hunter, who were corrupt - although no evidence has emerged to indicate that.
The dispute is at the center of the impeachment inquiry raging in Washington. House Democrats say Trump abused his office when he pressed Ukraine's president to investigate Biden and, thus, interfere in an American political campaign. Trump says he acted appropriately to root out corruption, wherever it appears.
Biden's interest in the region goes back to his first term in the Senate in the 1970s. He focused on European affairs, and after the Soviet Union collapsed in 1991, he directed attention to former Soviet states including Ukraine, arguing they be allowed to join NATO and given economic and military support.
After Russian troops seized and occupied the Crimean peninsula in the spring of 2014 - the first post-Cold War territorial takeover by Moscow - Ukraine rose to the top of the Obama administration agenda. Obama essentially outsourced the portfolio to his vice president - a task, by most accounts, Biden enthusiastically embraced.
"Ukraine was the top, or one of the top three, foreign policy issues we were concentrating on," said Mike Carpenter, Biden's foreign policy and defense policy adviser at the time. "He was front and center."
On one trip, in February 2014, Biden watched anti-government protesters fill the streets of Kyiv in what became known as the Maidan revolution. Within months, the pro-Russian government was ousted and replaced with pro-Western leaders.
Former aides described Biden's work after that as a kind of "marriage counseling," getting the newly elected president, Petro Poroshenko, to cooperate with the prime minister, Arseniy Yatsenyuk, a political rival.
Known for his bluntness, Biden warned them that Ukraine could not be seen as a "basket case" or allies would lose patience. "And then you'd be screwed and left at the mercy of Moscow," a former aide recalled Biden telling the men.
Ukrainians say Biden's most important contribution was showing that Washington would support Ukraine as it struggled to remain independent of Russia.
"Vice President Biden stood up strongly for Ukraine, and many of my fellow Ukrainians were very grateful," said Danylo Lubkivsky, a former deputy foreign minister. "The important thing is that the support that Biden represented was bipartisan."
Few here doubt that Hunter Biden was offered a lucrative position on the board of Burisma Holdings, a natural gas company controlled by a controversial businessman, because of his father's prominence.
It's common in Eastern Europe, and much of the world, to hire a celebrity or relative of a senior official to burnish a company's image, and to help shield it from official or unofficial shakedowns.
But the optics gave ammunition to Trump and his lawyer, Rudolph Giuliani. They have falsely claimed that Biden pressed Poroshenko's government to sack its top prosecutor, Viktor Shokin, to prevent him from investigating Burisma.
Current and former U.S. and Ukrainian officials say Burisma had been under scrutiny for alleged improper acquisition of licenses, a probe unrelated to Hunter Biden's position on the board. The investigation went dormant, they said, before Biden and a group of U.S. allies pushed for Shokin's ouster in 2015, arguing he was turning a blind eye to corruption.
In December 2015, Biden gave an impassioned address to the Rada, the parliament, to condemn the scourge of corruption and demand reform of the prosecutor general's office.
"The parliament exploded in applause," Boryslav Bereza, who was present, recalled this week. "Even those who were corrupt as hell, they were electrified and sincere in their applause."
Biden "was like the big brother coming to tell the little brother what to do - a recommendation that you can't ignore," Bereza said.
The vice president had planned to announce $1 billion in U.S. loan guarantees for Ukraine. But en route to Kyiv on Air Force Two, Biden changed his mind.
Poroshenko was dragging his feet building the institutions needed to take on corruption, aides said. Biden and his staff rewrote the speech, removing the loan guarantees.
In Kyiv, Biden privately informed Poroshenko of the decision and the demand: Fire Shokin, or you lose the loan guarantees.
"Poroshenko was clearly disappointed," said Colin Kahl, Biden's national security adviser at the time.
In an interview, Poroshenko recalled "heated" but cordial discussions with Biden.
He said the loan guarantees were contingent on meeting International Monetary Fund benchmarks, including replacing the prosecutor general. Biden was not alone in his demands, Poroshenko said.
"Pressure on us came from everywhere: the activists, political forces, embassies, international organizations," he said, adding that the names of Hunter Biden and Burisma never came up.
In the eight days before Shokin was fired in March 2016, Biden phoned Poroshenko four times to reiterate the U.S. position, former aides said. The Ukrainian leader finally relented, and Shokin was sacked.
Western diplomats saw Shokin, who still sometimes wore his old Soviet-style uniform, as a relic of a stultified system and a "pay-to-play" prosecutor. Shokin, who declined to be interviewed for this story, blames his ouster on an illegal foreign intervention in Ukraine's domestic affairs.
"My actions as General Prosecutor did not suit the interests of the U.S. Vice President Biden and the persons connected to him," Shokin said in an affidavit filed Sept. 4 in an Austrian court on a separate case. He said Biden was motivated by his son's connection to Burisma but offered no evidence.
Ukrainian officials say the inquiry into alleged improprieties at Burisma has never been completely closed.
"The Burisma case is still there; it's up and down," a senior Ukrainian official said, speaking on condition of anonymity to discuss sensitive matters. "But the Burisma case and a Hunter Biden case are totally different things, and the latter simply does not exist."
On Friday, Ukraine's current prosecutor general, Ruslan Ryaboshapka, said his office would revisit about 15 legal cases that were closed or had gone dormant in recent years, including several involving Burisma and the oligarch who controls it, Mykola Zlochevsky. Ryaboshapka said he would consider reopening any case that ended prematurely or improperly.
Visit the Los Angeles Times at www.latimes.com