WASHINGTON – For months, Rudolph Giuliani has acted as Donald Trump’s personal pit bull, lashing out at detractors who attacked the president over his politics and his policies.

But the attack dog is now under attack.

Giuliani, a former federal prosecutor who serves as Trump’s personal attorney, is at the center of a firestorm over whether Trump improperly pushed Ukraine to investigate a political rival, former Vice President Joe Biden, to bolster his own re-election bid next year.

A whistleblower's complaint, made public Thursday, named Giuliani as a central figure in the scandal that has led to an impeachment inquiry against Trump. Giuliani has previously acknowledged that he urged Ukraine to investigate Biden and his son, Hunter Biden, but insists that he approached Kiev at the State Department’s request.

Trump’s and Giuliani’s contacts with Ukraine have enraged House Democrats and raised questions about whether the president’s personal attorney should be meddling in foreign relations.

“It’s extremely unusual, and it’s disruptive to normal diplomacy,” said Steven Pifer, who served as U.S. ambassador to Ukraine under President Bill Clinton.

The complaint:Read the full declassified text of the Trump whistleblower complaint

The phone call:'I would like you to do us a favor.' What Trump and Zelensky said in their July 25 phone call

Michael McFaul, a former U.S. ambassador to Russia under President Barack Obama, called it “outrageously inappropriate” for Trump’s personal lawyer to be engaging with foreign officials on what amounted to a campaign issue and for the State Department to be facilitating such interactions.

“He has no jurisdiction, no authority, no mandate to be involved in matters that have to do with diplomacy, national security or interference in our elections,” said McFaul, now a professor at Stanford University.

Michael Green, who served on the National Security Council under President George W. Bush, said the president's personal attorney has no role in diplomacy. Any contact he had with the president's personal lawyer required special permission from the National Security Council's legal adviser and the White House legal office, he said.

Jeffrey Harris, who served as Giuliani's top deputy when Giuliani was an associate attorney general during the Ronald Reagan administration, bluntly slammed his former boss' conduct.

“He knows better," said Harris, a former assistant U.S. attorney in New York. "I have absolutely no sympathy for him for this. He knows better, unless he’s suffering under some condition that I’m not aware of. Rudy is a very smart guy. He always exercised good judgment. He’s very experienced in criminal law.”

“The Rudy Giuliani that I knew would prosecute the Rudy Giuliani of today," Harris said.

'Play ball'

The whistleblower’s complaint details numerous efforts by Giuliani to encourage Ukraine to investigate the Biden family over Hunter Biden’s ties to an energy company on which he served on the board of directors.

According to the complaint, Giuliani traveled to Madrid, Spain, on July 26 to meet with an adviser of Ukraine President Volodymyr Zelensky. The trip came just one day after a phone call in which Trump had urged Zelensky to investigate the Bidens. The purpose of Giuliani’s trip, according to the complaint, was to follow up on Trump’s call with Zelensky about “cases” they had discussed.

Giuliani::'When this is over, I will be the hero'

Giuliani also met on at least two other occasions – in New York in late January and Warsaw, Poland, in mid-February – with Ukraine’s prosecutor general, Yuriy Lutsenko, the complaint says.

The 2020 impact:Trump's efforts to discredit Joe Biden backfired on him. Will they hurt the former VP anyway?

U.S. officials were so deeply concerned by what they viewed as Giuliani’s circumvention of national security decision-making processes that State Department officials spoke with him to “contain the damage,” the complaint says.

Around the same time, the complaint says, Ukraine’s leadership was led to believe that a meeting or phone call between Trump and Zelensky would depend on Zelensky’s willingness to “play ball” on the issues that Giuliani had raised.

'Shut up, moron'

True to form, Giuliani has defended himself – and Trump – by slamming critics and what he has called the “dishonest” news media.

“Shut up, moron,” he snapped at liberal radio host Christopher Hahn during an appearance on Fox News.

In a Twitter rant on Thursday, he fired at Rep. Adam Schiff, the California Democrat who chairs the House Intelligence Committee.

"The Dem phony attack on my conduct as a lawyer, is intended to intimidate me in defending an innocent client," Giuliani wrote. "Schiff has been attempting to frame @realDonaldTrump for almost three years. He should be investigated for lying, enabling perjury, and trampling on constitutional rights."

Trump has steadfastly defended his most public defender, telling reporters on Wednesday that Giuliani has done an “incredible” job and was right to engage with Ukraine.

“Rudy Giuliani is a great lawyer,” Trump said at a news conference with Zelensky at the United Nations in New York Wednesday. “I’ve watched the passion that he has had on television over the last few days. He knows exactly what he’s doing.”

Defender-in-chief

Giuliani joined Trump’s legal team last year as the president’s personal attorney amid special counsel Robert Mueller’s investigation into Russian interference in the 2016 presidential election.

The former New York City mayor had earned the affection of Americans for the way he deftly guided the city through the aftermath of the 9/11 attacks. He was heralded as “America’s mayor,” named Time magazine’s Person of the Year in 2001 and was even considered for the job of Trump’s secretary of State.

Eventually, he jumped into his role as Trump’s defender-in-chief. He was a fixture on the cable-news circuit, vigorously denying any ties between the Russians and Trump’s re-election campaign and barking at anyone who suggested otherwise. After Mueller’s report, released in March, found no evidence of cooperation between Trump’s campaign and the Russians, Giuliani turned his attention to Ukraine and the Bidens.

According to a report in The Washington Post, Giuliani’s contacts with Ukraine rankled other diplomats, who questioned his motives and were kept so in the dark about his activities that they often learned about them like other Americans: By watching Giuliani’s frequent television appearances.

Mueller report:Read the special counsel report into President Trump, Russian interference

To impeach or not?:New poll: Majority of Americans against impeachment and removal of Trump

In an interview on CNN last week, Giuliani admitted, after denying it just seconds earlier, that he had asked Ukraine to investigate Biden’s role in the firing of a Ukrainian prosecutor. Giuliani and Trump contend, without evidence, that Biden pressured Ukraine to fire prosecutor general Viktor Shokin because Shokin was looking into an energy company where Hunter Biden served on the board of directors.

Trump himself brought up the investigation in the phone call with Zelensky on July 25. A summary of the call released Wednesday shows that Trump repeatedly asked Zelensky to reopen the investigation into the energy company and said he was directing Giuliani and Attorney General William Barr to assist in the inquiry.

Pushing for investigation:Trump acknowledges bringing up Joe Biden in phone call with Ukraine president

Trump denies that he was trying to dig up dirt on Biden. But outraged Democrats said that Trump asking a foreign government to investigate a political rival is an egregious abuse of power and that Giuliani’s role contacts with Ukraine was improper.

“What role does Rudolph Giuliani play in the federal government?” asked New York Rep. Hakeem Jeffries, the House Democratic Caucus Chairman.

Giuliani “is clearly interjecting his own partisan political goals into what should be just a bilateral conversation,” said Sen. Chris Coons, D-Del.

A 'dangerous' message

The State Department did not respond to questions from USA TODAY on Wednesday seeking comment on Giuliani’s role in Ukraine. Kurt Volker, the State Department’s special representative for Ukraine, also did not respond to any email asking if he helped connect Giuliani with Ukrainian officials.

At a press conference in New York on Thursday, Secretary of State Mike Pompeo side-stepped a question about whether the State Department directed Giuliani to contact Ukrainian officials, as Giuliani has asserted. Pompeo said State Department officials have been focused on improving U.S.-Ukraine relations and helping the new government root out corruption.

Pifer, the former U.S. ambassador to Ukraine and now a fellow at Stanford University, said Giuliani’s contacts sent a confusing and dangerous message to Ukraine.

“You have the embassy there trying to advance American interests, and Mr. Giuliani comes in with a very different agenda,” he said. “His agenda is to get the president elected next year. Those are very different things.”

How impeachment works:What would it take to impeach Donald Trump?

It has happened:The times an American president was impeached (and the one time it came close)

Giuliani’s efforts also damaged the U.S.’s longstanding push to get Ukraine to clean up corruption in that country, Pifer said.

“To have Rudy Giuliani coming in and saying we want you to give us political dirt on the president’s rival undercuts that message,” he said.

Leon Panetta, who served as CIA director under Obama, said Giuliani "was operating as an agent of the president" without a portfolio.

"The implication is that there was a conspiracy here by the president and his personal lawyer to basically get this president (of Ukraine) to conduct the investigation," Panetta said. "Giuliani is going to have to obviously defend himself in this process."

Contributing: Deirdre Shesgreen, Kristine Phillips, Nicholas Wu, Christal Hayes, Courtney Subramanian and Tom Vanden Brook