President Trump, whose top attorney handling the Russia probe resigned Thursday, is struggling to find top-notch defense lawyers willing to represent him in the case, according to multiple Trump advisers familiar with the negotiations.

Some law firms have signaled that they do not want the controversy of representing a divisive and unpopular president, while others have told Trump advisers they have clients with conflicting interests, according to several lawyers and three of the president’s advisers. Several prominent white-collar lawyers also have declined requests to sign on with the president in recent weeks, including former solicitor general Theodore B. Olson.

The difficulties in finding representation come as the investigation by special counsel Robert S. Mueller III intensifies its focus on Trump’s actions. John Dowd, the president’s chief lawyer in handling the Mueller probe since last year, quit Thursday morning after several strategy disputes with the president, who ultimately lost confidence in the veteran lawyer, three Trump aides said.

Dowd had been the president’s main point of contact with Mueller’s office, which is investigating Russian interference in the 2016 presidential election and contacts with Trump campaign members. Dowd also had been negotiating the terms for the president to sit for an interview with Mueller’s team as it examines whether Trump obstructed justice by seeking to shut down the investigation.

Despite overtures by Trump’s aides and Trump himself in the past weeks, several lawyers have passed on taking on the president as a client. Olson’s law firm, Gibson, Dunn & Crutcher, publicly rebuffed the idea of him representing Trump on Tuesday through a statement from one of his partners — less than 24 hours after a Trump ally had asked him to consider the job. Several weeks earlier, the Trump team reached out to Robert J. Giuffra Jr., a partner at Sullivan & Cromwell, who also declined, according to a person familiar with the talks, who spoke on the condition of anonymity to discuss internal deliberations.

Two weeks ago, Trump also interviewed Williams & Connolly partner Emmet T. Flood, a Republican defense lawyer who helped President Bill Clinton during impeachment proceedings, and asked him to consider joining his legal team in some capacity. As of Dowd’s resignation Thursday, the discussions were still preliminary, people familiar with the talks said. Trump and his advisers are eyeing one high-profile lawyer to take the lead on his legal team, but neither the president nor the lawyer have decided whether to begin the representation, according to three people familiar with the discussion.

The struggles are reminiscent of Trump’s difficulties in the spring of 2017 when the president was first seeking new attorneys to represent him in the Russia probe. He interviewed a half-dozen high-profile legal stars in the white-collar defense bar, including Flood, Brendan V. Sullivan Jr. and A.B. Culvahouse Jr.; all of them declined.

“These major law firms have spent millions of dollars on their image,” said one Trump adviser, who also spoke on the condition of anonymity. “It’s political. They are saying that representing this president is just too controversial.”

Ty Cobb, who joined the White House last summer as an internal lawyer handling the Mueller case, originally had been offered the job of serving as Trump’s lawyer working alongside Dowd. But two people familiar with his hiring said leaders at Cobb’s law firm, Hogan Lovells, had expressed reservations about Cobb representing Trump personally; some firm leaders were more amenable to Cobb representing the White House instead.

Aside from being controversial, aides said Trump has proved to be a difficult client, as Dowd learned firsthand.

Dowd complained to colleagues that Trump had ignored his advice and tweeted attacks on Mueller and other topics hours after Dowd and other advisers urged him not to, those colleagues said. Dowd also said he was personally insulted by the president’s efforts to hire other lawyers. One person familiar with the dynamics said Trump frequently praised his legal team to their faces but criticized them when they were not around.

Dowd declined to discuss his decision when reached Thursday. “I love the President and wish him well,” he wrote in an email.

But privately, Dowd was “blindsided” when the president interviewed Flood and again when Trump announced he was adding conservative lawyer and attack-dog Joseph diGenova to the team last week.

He and the president had been increasingly disagreeing over strategy, but especially so on Saturday. One Trump adviser said the president berated Dowd for not doing enough to, in the president’s view, highlight corruption and political bias in the FBI to undercut the legitimacy of the Mueller probe. Trump told Dowd he wanted to tweet that the firing of deputy FBI director Andrew McCabe was another reason the Mueller probe should be shut down, the adviser said.

At Trump’s insistence, Dowd issued an emailed statement saying the investigation was corrupted by political bias, according to a Trump adviser. Dowd called on Deputy Attorney General Rod J. Rosenstein, who oversees that probe, to shut it down.

“I pray that Acting Attorney General Rosenstein will follow the brilliant and courageous example of the FBI Office of Professional Responsibility and Attorney General Jeff Sessions and bring an end to alleged Russia Collusion investigation manufactured by McCabe’s boss James Comey based upon a fraudulent and corrupt Dossier,” Dowd said.

Dowd told The Washington Post that he was speaking for himself and not on Trump’s behalf. Earlier Saturday, Dowd had told the Daily Beast that he was speaking on behalf of the president and in his capacity as the president’s attorney. After the Daily Beast published its story, Dowd emailed the publication and said he was not speaking on the president’s behalf.

At 10 a.m. Thursday, Dowd resigned without consulting Trump, three advisers said. Aides said they were unsuccessful in asking him to hold off until they could confer with the president and prepare a statement.

A huge bone of contention between Trump and his team has been over testifying in front of Mueller’s team, these people said. Trump wants to do so, thinking he can talk his way out of it, while his lawyers are far more wary, these people said. Dowd and Marc Kasowitz, Trump’s former lawyer whom he still occasionally consults, have told Trump he could damage himself by testifying. His chief White House counsel, Donald McGahn, also has chafed at Trump granting an interview and has criticized others on the team.

Trump has groused to friends and aides that he thinks his lawyers are weak and that his New York attorneys are tougher and better.

Earlier this month, Trump dubbed news reports of trouble on his legal team as inaccurate.

“The Failing New York Times purposely wrote a false story stating that I am unhappy with my legal team on the Russia case and am going to add another lawyer to help out,” Trump tweeted March 11. “Wrong. I am VERY happy with my lawyers, John Dowd, Ty Cobb and Jay Sekulow. They are doing a great job.”

Eight days later, the president hired diGenova, and Dowd is now off the team.

Sekulow was in the White House meeting with Trump about the case and his legal team Thursday afternoon, White House officials said. He and diGenova were spotted at the White House again late Thursday.

Sen. Lindsey O. Graham (R-S.C.) said Thursday that he feels confident the president eventually will find good counsel and that he is more worried about how focused Trump seems to be on the probe.

“The model should be the Bill Clinton model,” Graham said. “You can go after the special counsel, like he did with Ken Starr, and ask about impartiality, but the president should focus on being president. I’m not worried about him finding good lawyers. He’ll find them. I’m worried about him and his day job, not being distracted. Clinton, for all his problems, never lost sight of being president. Clinton let other people go after the so-called witch hunt.”

Rosalind S. Helderman and Robert Costa contributed to this report.