From his first weeks in office to his latest crisis over the FBI’s raid on his personal lawyer’s office, home and hotel room, President Trump has periodically expressed the same exasperated plea: “Where’s my Roy Cohn?”

Throughout his career, Trump has expressed frustration that he has never found a lawyer quite as tough, loyal and effective as his first, the legendary New York street fighter who taught Trump to always hit back 100 times harder than he’s been punched.

Trump has relied on a series of attorneys who have been as much consigliere as courtroom lawyer. They had informal discussions with people who threatened to damage Trump’s public reputation. They worked the news media more than they wrote briefs. They talked tough. They made problems go away.

The latest such lawyer in Trump’s bullpen has been Michael Cohen, the New Yorker who responded to allegations about extramarital affairs with Trump by making a payment to a porn actress and allegedly helping to engineer the National Enquirer’s payment to a Playboy model.

Here's a breakdown of the people that President Trump's lawyer Michael Cohen has dealt with and the investigations he's entangled in. (Jenny Starrs/The Washington Post)

But as often as Cohen — like Roy Cohn before him — has publicly expressed his loyalty to Trump, the president has at times through the years taken a clear step away from his most trusted attorneys, particularly at times when they have become the subjects of news coverage that Trump might have found embarrassing.

The president has for weeks referred to Michael Cohen publicly as “my attorney.” In the past week, although the president has not backed away from his long-standing ties with Cohen, the way White House officials have spoken of Trump’s relationship with Cohen has appeared to shift.

“I believe they’ve still got some ongoing things, but the president has a large number of attorneys,” White House press secretary Sarah Huckabee Sanders said Monday.

Another White House press aide, Hogan Gidley, went on TV to call Cohen just one of “many” Trump lawyers.

The rhetorical pivot would have sounded familiar to Roy Cohn, who died in 1986, having been largely abandoned by his longtime client and friend.

In 1973, Cohn looked as if he had seen more than his share of street fights. His hooded eyes, scarred and bloodshot nose, close-cropped hair and sharp tongue fortified his reputation as a scorched-earth lawyer, a ruthless advocate for his clients.

Meeting Cohn that year changed everything for Trump. Their first encounter took place inside a Manhattan members-only club that Trump described as “the sort of place where you were likely to see a wealthy 75-year-old guy walk in with three blondes from Sweden.”

Trump, then 27 and just breaking away from his father’s real estate business, was hungry for connections, looking to meet the power brokers who could help him fulfill his dream of becoming a big-deal Manhattan builder. Cohn was just the ticket — a celebrated and much-feared former prosecutor who boasted about his ties to New York’s Mafia bosses, worked on the espionage case against Julius and Ethel Rosenberg and served as Sen. Joseph McCarthy’s sidekick in the anti-Communist witch hunts of the 1950s.

Attorney and client, strategist and builder, Cohn and Trump worked together for more than a decade. They pushed back against a federal race discrimination lawsuit stemming from allegations that Trump and his father had made it difficult for black tenants to find apartments in Trump buildings. (They eventually settled with prosecutors.)

They won glowing profiles in top magazines and newspapers, and they were happily quoted praising each other. They spoke often, sometimes a dozen times a day. They joined forces to battle construction unions, win building permits and press libel suits against critical reporters.

“Roy was a very good lawyer for me,” Trump told The Washington Post in an interview in 2016. “Roy was a really smart guy who liked me and did a great job for me on different things. . . . Roy was a very tough guy.”

Trump said that the two men’s styles clicked, especially when they worked aggressively against competitors or critics. Their retaliatory approach wasn’t just Cohn’s creation, Trump said: “It was a combination, maybe, but it was a style that worked.”

But Trump bristled at the idea that Cohn was the leader in their relationships. “He wasn’t a mentor,” Trump said.

Asked whether Cohn had inspired his aggressive style in business, Trump backed away from his praise. “Perhaps,” he said. “I mean, I was young. Perhaps, but I think even at a young age I had a certain style. I had a certain feel. But Roy was one of my lawyers. . . . I’ve been blessed with some really good lawyers in my life that did really good work for me. And I’ve had some lawyers that didn’t do as good. That’s more of the normal.”

In 1984, Cohn fell ill, suffering from HIV. As Cohn lay dying at the National Institutes of Health hospital in Bethesda, Md., Trump distanced himself from his longtime friend. Cohn believed Trump had cut him off because he was HIV-positive.

“I can’t believe he’s doing this to me,” Cohn said at the time. “Donald pisses ice water.”

Trump always denied any anti-gay motivation, saying that he had always known that Cohn was gay and never minded it.

In the final months of Cohn’s life, in 1986, when New York legal authorities accused Cohn of unethical behavior and moved to disbar him, Trump joined other prominent Cohn clients and defended his character publicly, inviting him to visit Mar-a-Lago, his Florida estate.

Cohn died five weeks after he was disbarred. At his memorial service, Trump stood silently in the rear.

In the first months of the Trump administration, according to the New York Times, the president, perturbed by Attorney General Jeff Sessions’s decision to recuse himself from supervising the investigation into the Trump campaign’s relationship with Russia, asked aides, “Where’s my Roy Cohn?”

Michael Cohen, who read Trump’s bestseller “The Art of the Deal” while he was still in high school, has worked for Trump for more than a decade. He once pledged that he would “do anything to protect Mr. Trump.”

Cohen’s legal career is far less storied than Roy Cohn’s was, but Cohen found his way into Trump’s inner circle first by buying condos in Trump buildings in Manhattan and later by working with the developer on an effort to build a Trump Tower in Moscow.

Like Cohn, Cohen talked tough, once threatening a Daily Beast reporter who had asked about Ivana Trump’s allegation, later softened, that Donald Trump had raped her when they were a married couple. “I will take you for every penny you still don’t have,” Cohen told the reporter.

Cohen has continued to pronounce his loyalty to Trump, telling Sean Hannity on Fox News last year that he “will do what’s necessary to protect him.”

After the FBI raid, Trump called the seizure of his lawyer’s records an “attack on our country” and a “disgraceful situation.” The president has not spoken publicly about Cohen since then.

Correction: An earlier version of this report said that Cohen made a payment to a Playboy model in 2016. The National Enquirer’s publisher, American Media Inc., made the payment; a lawsuit alleged Cohen helped engineer that payment. This version has been updated.