WASHINGTON — President Donald Trump on Saturday stood behind personal attorney Rudy Giuliani, one of his highest-profile and most vocal defenders, amid reports that federal prosecutors in the city Giuliani led as mayor are eyeing him for possible lobbying violations.

Behind the scenes, however, many of Trump’s closest aides and advisers, inside and outside the White House, quietly wish the president would cut ties with Giuliani, whose leadership of New York after the Sept. 11, 2001, terrorist attacks earned him worldwide admiration and the moniker of “America’s mayor.”

Giuliani was a force in Trump’s defense during the lengthy Russia investigation by the special counsel. Yet the effort to undermine special counsel Robert Mueller led Giuliani to Ukraine, which now entangles the former federal prosecutor and mayor in legal jeopardy and is central to the danger threatening the presidency he labored to protect.

The New York Times reported Friday, citing a pair of anonymous sources familiar with the matter, that the investigation is linked to Giuliani’s efforts to undermine Marie Yovanovitch, formerly the U.S. ambassador to Ukraine. The U.S. attorney’s office in Manhattan has declined to comment on the Times report.

Two Florida businessmen with ties to Giuliani were charged Thursday with federal campaign finance violations. Both played key roles in Giuliani’s efforts to get Ukraine to launch a corruption investigation into Democratic presidential contender Joe Biden and his son Hunter, who sat on the board of a gas company there.

On Saturday, Trump deployed in Giuliani’s defense the same two-word phrase — “Witch Hunt!” — he repeatedly used to attack the legitimacy of the special counsel investigation into Russian interference in the 2016 presidential election and now the House impeachment inquiry against him.

“So now they are after the legendary ‘crime buster’ and greatest Mayor in the history of NYC, Rudy Giuliani,” Trump tweeted while on the way to his northern Virginia golf club. “He may seem a little rough around the edges sometimes, but he is also a great guy and wonderful lawyer.”

Later Saturday, he told Jeanine Pirro during a telephone interview broadcast on her Fox News Channel program that Giuliani continues as his lawyer.

“He’s a great gentleman. He was a great mayor, one of the greatest, maybe the greatest mayor in the history of New York,” the president said. “He was a fantastic prosecutor. I know nothing about him being under investigation … I can’t imagine it.”

“He’s a man that looks for corruption and whatever he does I really believe he’s a totally, I mean, I know he’s an honorable man,” Trump added.

A whistleblower complaint about Trump’s dealings with Ukraine led Democratic House Speaker Nancy Pelosi to open an impeachment inquiry into the president.

Three House committees taking depositions in the impeachment probe heard Friday from Yovanovitch.

The former ambassador has said she was fired from her post in May after insisting that Giuliani’s requests to Ukrainian officials for investigations be relayed through official channels, according to a former diplomat who has spoken with her. The former diplomat spoke on condition of anonymity to discuss the private conversation.

Trump seemed to try to create space between himself and Giuliani on Friday when reporters asked if Giuliani was still representing him.

“Well, I don’t know. I haven’t spoken to Rudy,” Trump said as he left the White House for a trip to Louisiana, adding that the two spoke briefly on Thursday. “He’s a very good attorney, and he has been my attorney. Yeah, sure.”

Asked if he still represented Trump, Giuliani replied to The Associated Press with a one-word text message: “Yes.”

White House officials have been flabbergasted by Giuliani’s performance on Trump’s behalf, particularly his habit of revealing embarrassing information without so much as a heads-up to the president’s full-time aides.

Aides have come to view Giuliani’s behavior much as they have their boss’ — with resignation that they will rarely be consulted beforehand to develop a strategic plan, and that any plan will be ignored.

One White House aide said there was frustration among aides that they have borne the brunt of criticism from some in Trump’s orbit for not having a more coordinated response to the impeachment probe, saying they were operating without visibility into what Giuliani has been doing. The aide and others who spoke on this subject did so on the condition of anonymity.

White House lawyers rarely deal with Giuliani directly, preferring to coordinate when necessary with Jay Sekulow, viewed as the more even-keeled lawyer on the president’s outside team.

Aides who spoke on this subject said the general feeling among them is that Trump has yet to fully grasp the extent of Giuliani’s side-dealings and hope Trump will eventually sour on his fellow New Yorker.

Giuliani was first brought on as the public face of Trump’s defense of the Russia investigation, with Trump valuing his pugnacious style from the 2016 campaign and his reputation as “America’s mayor.”

Giuliani wanted to be secretary of state, but ended up withdrawing from consideration for a Cabinet post.

But Giuliani successfully pressed Trump’s case on cable TV, even though some of the scattershot interviews seemed to do more harm than good. Even then, Giuliani at times let slip seemingly damaging information as a way to get ahead of a story, to normalize something while also lacing into the special counsel’s credibility and undermining his investigation.

He also was part of a key decision to block Trump from conducting an in-person interview with Mueller.

Many in the administration — including in the West Wing and at the State Department — have tried to distance themselves from Giuliani’s dealings in Ukraine, eagerly leaking to reporters unflattering stories about the former mayor’s clumsy investigative efforts.

And while there is a grudging respect among some Trump allies and in the reelection campaign at Giuliani’s willingness to defend the president on TV, something few others in the White House have done of late, many believe his interviews have become too hyperbolic and his undisciplined manner of speaking could put Trump at risk.

But though Trump himself has at time grown frustrated with Giuliani, he has defended the former mayor to people around him. Trump has spoken admiringly of Giuliani’s no-nonsense style and willingness to go all-out to defend the administration and attack the president’s Democratic foes and the news media, according to three White House officials and Republicans close to the White House. The officials insisted on condition of anonymity to discuss private conversations.