NEW YORK — Rudy Giuliani, once known as "America's Mayor" and hailed for helping unite a wounded city after Sept. 11, has become the aggressive face of President Donald Trump's forceful new legal team.

Giuliani, who is bonded with the president by a particular brand of New York bravado, has escalated Trump's attacks on the Department of Justice, pushed for strict limits on special counsel Robert Mueller's Russia probe and upended White House legal strategy. Giuliani and Trump cut out senior West Wing aides this week as they hashed out plans to combat what they see as an existential threat to his presidency.

But on Friday, Trump suggested that Giuliani may have stepped out of line — at least in one area.

The president told reporters that the former New York City mayor still needed to "get his facts straight" on one of the legal fronts facing Trump, the $130,000 payment that his personal attorney Michael Cohen made to porn actress Stormy Daniels in 2016 to buy her silence about a sexual tryst with Trump.

Trump said Giuliani was "a great guy but he just started a day ago" and that he was still "learning the subject matter."

It remained to see what impact Trump's brushback would have on Giuliani, who had quickly become the dominant figure on the president's reshuffled legal team as his political inner circle is stocked with familiar, TV-ready faces.

Giuliani has warned Trump that he fears that Cohen may "flip" on him. He has urged Trump to cut off communications with Cohen, according to a person close to Giuliani but not authorized to discuss the talks publicly. After an FBI raid on Cohen's office and home, Giuliani also indicated that he wanted to change the discussion surrounding the $130,000 payment that Cohen made to Daniels to buy her silence about a sexual tryst with Trump. Giuliani did so with a jaw-dropping interview with Sean Hannity on Wednesday.

Giuliani's remarks — that Trump knew about the payment and had repaid Cohen for it — seemed to contradict Trump's past statements appeared to draw his ire on Friday. But he argued that it removed legal peril over a possible campaign finance violation, a claim some legal experts have questioned.

Giuliani's bold offensive — on display in a series of cable news appearances in which he unleashed broadsides on the very law enforcement officers with whom he once worked — underscored the thoroughness of his transformation from moderate Republican mayor of a liberal city to fiery conservative hero.

Trump and Giuliani have had several private conversations in recent days in which former mayor fanned the president's anger with Mueller's probe, according to two people familiar with their conversations who spoke on condition of anonymity because they weren't authorized to publicly discuss them. Giuliani has warned Trump against sitting down for an interview with Mueller and has suggested that, at a minimum, the president place limits on his level of cooperation.

"Russian collusion is total fake news," Giuliani, a former U.S. attorney, told Fox News. "Unfortunately, it has become the basis of the investigation. And Mueller owes us a report saying that Russia collusion means nothing, it didn't happen. That means the whole investigation was totally unnecessary."

Over a pair of Fox News interviews, Giuliani also unleashed a series of provocative broadsides. He said Trump had fired James Comey last year because the FBI director wouldn't publicly clear the president of wrongdoing in the Russia probe, a different explanation than the White House offered. He said he would defend the president's daughter Ivanka Trump but suggested that her husband, Jared Kushner, was "disposable." And he derided the agents who raided Cohen's office as "stormtroopers," a charge that attracted particular attention because it appeared to evoke Nazi soldiers in the context of the Manhattan U.S. attorney's office, which had approved the raids and which Giuliani had once led.

"It's a different Rudy. He's always been tough, but he changed when he started to have national ambitions," said George Arzt, former press secretary to Democrat Ed Koch, one of Giuliani's predecessors as New York City mayor. "And after he wedded himself to Trump, his popularity in his hometown disappeared completely."

Giuliani was elected mayor in 1993 on a pledge to slash the city's sky-high crime rate. That year, 1,946 people were killed in the city. By 2001, Giuliani's final year in office, the number had shrunk to 649.

Giuliani was largely praised for the drop in crime but remained a polarizing figure. His no-holds-barred defense of the New York Police Department, often at the expense of minority communities, drew sharp criticism. A possible Senate run was abandoned after a cancer diagnosis. And after years of public battles and a very messy public separation from his second wife — which resulted in his moving out of Gracie Mansion, the mayor's official residence — his poll numbers sank and many New Yorkers were eager for a change at City Hall.

But then, one clear September day just a few months before he was to leave office, two planes flew into the World Trade Center.

In the hours after the attacks, Giuliani became the face of the nation's grief. His leadership — both inspiring and compassionate — over the following weeks earned him the nickname of "America's Mayor."

But his relationship with the city would soon change again.

Giuliani played a key role in the 2004 Republican National Convention that re-nominated President George W. Bush, a deeply unpopular figure in New York. And Giuliani shifted right on a number of issues — including gun control and public funding of abortions — during his failed presidential run four years later.

Although his future electoral prospects vanished, Giuliani remained a conservative darling, a frequent guest on Fox News and a sought-after member of the political speaking circuit. He has known Trump for decades — his bomb-throwing rhetorical style can at times mirror that of the president — and he became an aggressive surrogate for the celebrity businessman from the early days of his insurgent presidential campaign.

Giuliani had been widely expected to join Trump's administration but was passed over for secretary of state, the position he badly wanted, and eventually was left without a Cabinet post.

But the president kept in touch with Giuliani, sometimes calling to ask for advice, and frequently asked for the ex-mayor's take on developments in the special counsel's probe, according to three people familiar with the conversations but not authorized to publicly discuss private talks.

In the weeks before he hired Giuliani last month, Trump had grown increasingly frustrated with the cable news chatter that he couldn't hire a big-name attorney for his legal team. But, according to one person familiar with his conversations, he later boasted to a confidant that he had struck a deal that he believed would silence those critics: He was hiring "America's F---ing Mayor."