Trump this week asked Giuliani to scale back his media appearances after the recent interviews, White House aides said, and complained that his lawyer did not know all the facts of the case. The president also asked Giuliani to clean up some of his misstatements publicly, complaining he created a weekend of news, including negative cable chyrons, at a time when Trump wanted public attention focused on special counsel Robert S. Mueller III disputing a BuzzFeed report that Trump had asked Cohen to lie to Congress.

The recent tensions between Trump and Giuliani highlight the unique role he plays for the president.

Even though Trump has been frustrated with Giuliani’s performance several times since he became his lawyer in April, he continues to get a longer leash than most of the president’s aides and surrogates. That’s because Giuliani, whom he considers a friend, is doing what Trump wants — serving chiefly as his public defender rather than his pragmatic legal counsel — and because the president would struggle to replace him after being turned down by several high-profile attorneys reluctant to represent the mercurial Trump.