As the impeachment inquiry against President Trump has unfolded, one name in particular has surfaced over and over again in both private hearing transcripts and public testimony: the president's personal lawyer, Rudolph Giuliani.

Congressional testimony has placed Giuliani at the center of the Ukraine affair, with multiple witnesses telling House investigators that he helped spearhead an irregular diplomatic channel between the U.S. and Ukraine.

The aim of that effort, witnesses said, was to leverage the promise of a White House visit and millions in U.S. assistance for Ukraine in order to force Ukraine to investigate former Vice President Joe Biden. In the now infamous July 25 call between Trump and Volodymyr Zelenskiy, Trump tells the Ukrainian president to be in touch with Giuliani.

"Rudy very much knows what's happening and he is a very capable guy. If you could speak to him that would be great," the president says.

Giuliani's outsize role is nothing new for a public figure once known affectionately as "America's mayor." While his work as the president's chief defender has befuddled many, former colleagues say that Giuliani has hardly changed since his early lawyer days in the 1970s. In interviews with NPR, they say his penchant for the limelight, his refusal to give up, and his shrewdness for divisive political fights are not just trademark Giuliani, they match the style of his fellow New Yorker in the White House.

'It Fired Me Up'

Jeffrey Harris worked with Giuliani while they were young attorneys in New York. Giuliani was a junior federal prosecutor in the 1970s, and Harris was the deputy associate attorney general. They sometimes ate dinner together during the work week.

"I think it was pretty well by consensus that Rudy was among the very, very best — the top two or three," Harris said of Giuliani's work as a prosecutor.

Then, in the 1980s, Giuliani found fame as the U.S. Attorney in Manhattan thanks to his battles against the mafia. His success drew comparisons to the Prohibition-era crime fighter Eliot Ness.

Giuliani's deputies included former FBI Director James Comey, who wrote about his former boss in his 2018 memoir, A Higher Loyalty.

"As a young prosecutor I found his brash style exciting, which is part of what drew me to his office," Comey wrote. "I loved it that my boss was on magazine covers, standing on the courthouse steps with his hands on his hips, as if he ruled the world. It fired me up."

Giuliani got so much attention, Comey wrote, because he demanded it.

"The most dangerous place in New York is between Rudy and a microphone," Comey wrote.

In 1994, the Republican became mayor of New York. Mayor Giuliani was both popular and divisive, a strong manager whose many demands made enemies. He oversaw a reduction in crime, but people of color found many policies biased. Under Giuliani, police cracked down on minor offenses, like panhandling, which caused deep divisions when offenders were black and police white.

As mayor, Giuliani leaned into such divisive fights, but by the end of his time in office, his popularity was fading. Then came the September 11 attacks, which earned Giuliani the nickname "America's Mayor" for the prominent role he took calming a nation shaken by the terrorist attacks. He was even named Time's person of the year.

Giuliani left office a national hero, and his reputation helped him launch a career in the private sector. He marketed his crime-fighting and management expertise through a firm called Giuliani Partners.

Among his partners at the firm was Bernard Kerik, the 40th police commissioner of New York and a former police detective who volunteered for Giuliani's mayoral campaign. They served as security consultants to foreign governments, like the leaders of Mexico City.

"I think you're paying for experience, you're paying for a reputation and the successes of the Giuliani administration," Kerik said of the firm's work. "So, when people look at Giuliani and they are looking for the same types of programs or success or just those types of achievements in foreign countries, they're going to call somebody that's actually done it."

A rebranding

In 2008, Giuliani ran for president, suffering a defeat that seemed to end his political career. But he remained a big name when he supported another New Yorker eight years later: Donald Trump.

Campaigning for Trump in 2016, Giuliani alleged that Trump's rival for the White House, Hillary Clinton, perverted U.S. diplomacy for personal gain during her time as secretary of state.

"She turned the State Department so corrupt. Pay money, get access. Pay money, get favors. Pay a lot of money, get big favors," Giuliani said. "You know what you call that? Bribery!"

As Trump rode to victory, Giuliani offered advice, including one piece that seems especially meaningful, in light of recent events. It was about Trump's Muslim ban.

At the time of Trump's call for the ban, even fellow Republicans denounced the idea as unconstitutional. But Giuliani told Fox News he helped improve it.

"When he first announced it, he said Muslim ban. He called me up [and] he said 'Put a commission together, show me the right way to do it legally,'" Giuliani said.

Giuliani worked to narrow the ban to a few countries seen as dangerous so that it could be rebranded as an anti-terrorism measure.

'Talk with Rudy'

The Ukraine affair has included a similar rebranding attempt.

Giuliani has been advising Trump since he took office, and eventually joined his legal team in 2018. He has kept serving foreign clients.

Some of those clients were from Ukraine, where Giuliani started doing business in 2017. One of his companies signed a security contract with the city of Kharkiv, the home city of anti-corruption activist Daria Kaleniuk.

"Unfortunately, the city is not lucky and the current mayor of the city has roots to organized and crime corruption," Kaleniuk said. She said Giuliani met a range of people with checkered reputations, including two businessmen who've since been indicted for alleged campaign finance violations.

The two men, Lev Parnas and Igor Fruman, are among the sources Giuliani relied on as he sought the investigations that Trump brought up on the phone with Ukrainian President Zelenskiy.

"I was very much surprised because I had a feeling that Rudolph Giuliani was a good guy, a prominent mayor of New York, and I wouldn't expect such kind of person to meet the most toxic people in Ukraine, which have ties to organized crime and links to Russia," said Kaleniuk.

U.S. Ambassador to the European Union Gordon Sondland and William Taylor, acting U.S. ambassador to Ukraine, are among the diplomats who've testified to Giuliani's role in the Ukraine scandal.

"President Trump directed us to talk with Rudy," Sondland testified.

Giuliani and Trump have justified their dealings with Ukraine much in the way they branded the Muslim ban. Rather than call it a probe of Biden, they have called it a probe of corruption.

"We have an obligation to investigate corruption, and that's what it was, in my opinion, that's what it was is corruption," Trump said in October.

Some former friends remain mystified by Giuliani's work for the president, including fellow former prosecutor Jeffrey Harris.

"If I could get him in in a candid moment where he'd really tell me what he thought, I'd ask him why he's doing this. What's going to be the first paragraph in his obituary, if we sort of put it in those terms," Harris said. "I'd say to him, 'Rudy, why did you take such an excellent career where you got accolades every step along the way and associate yourself with the kinds of activities that, other than the hardcore Trump supporters, most people think you have become a joke?"

Kerik rejects the idea that Giuliani did anything wrong.

"I think that's bulls***. That's a complete bulls*** argument. The people that's responsible for this mess are the members of Congress that's putting on this scheme of an impeachment, this fraud of an impeachment argument," Kerik said.

For his part, Giuliani recently told NPR he should be thought of as a hero and that he deserves a medal. In similar comments to Fox News, he said:

"I actually think they should all congratulate me because if it weren't for me, nobody would've uncovered and faced massive corruption by the vice president of the United States. In fact, I am a legitimate whistle blower."

Giuliani said the president would like him to give evidence to the Senate. But as the chamber prepares for a possible impeachment trial, top Republicans have indicated he's not a witness they need to hear.

Lilly Quiroz and Shannon Rhoades produced and edited this story for broadcast. Heidi Glenn adapted it for the Web.

Copyright 2019 NPR. To see more, visit https://www.npr.org.