Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Legal and ethics experts on Tuesday were largely critical of a once-highly respected lawyer who helped hire investigators employing questionable tactics to stop the Harvey Weinstein sex abuse allegations from coming to light.

The latest explosive New Yorker story by Ronan Farrow reveals how David Boies, a high-profile trial attorney and partner at the law firm of Boies, Schiller and Flexner, signed off on a contract with a London-based investigative agency, Black Cube, to employ an agent named "Anna" who tracked accusers as well as journalists attempting to uncover the story.

Attorney David Boies walks to the U.S. Court of Federal Claims on Oct. 7, 2014 in Washington. Win McNamee / Getty Images file

The New Yorker reported that one contract Boies signed was meant to help Weinstein's efforts “to completely stop the publication of a new negative article in a leading New York newspaper.”

The story noted how Black Cube employed former Israeli spies for its information-gathering operations. Weinstein also employed investigative agencies to gather embarrassing stories on reporters covering the story and to find their sources.

Related: Rape Allegation Against Harvey Weinstein Is ‘Credible,’ Police Official Says

One such investigator attempted to reach out to Jodi Kantor, the New York Times reporter who originally broke the story, and another, from a Los Angeles-based agency PSOPS, wrote a detailed report on her and Farrow. Another agency, Kroll, dug up information on Ben Wallace, a reporter for New York magazine, who was also trying to uncover the story, and actress Rose McGowan, who alleges Weinstein raped her.

Boies confirmed to the New Yorker that he was representing The New York Times at the time he signed the contract but he also told the magazine that he did not select the firms or direct the investigators’ work and that the firm’s involvement with the investigator was a mistake.

But experts interviewed by NBC News thought Boies’ conduct reflected more than just a mere mistake.

“I think it’s inappropriate for a lawyer to hire oppositional research on a current client; isn’t that what this is in essence?” asked Deborah Rhode, a Stanford Law professor and legal ethics expert.

Boies defended his actions on Tuesday, issuing a statement to employees at his firm.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“While I told Mr. Weinstein that I was not in a position to represent him on these issues, his request to contract with investigators seemed, at the time, like a reasonable accommodation for a longtime client,” Boies said. “I regret having done this. It was a mistake to contract with, and pay on behalf of a client, investigators who we did not select and did not control. It was not thought through, and that was my mistake. I take responsibility for that.”

Boise said a clause in his contract with The New York Times allowed him to engage clients with adverse interests to his. The American Bar Association’s Model Rule 1.7, which most states have adopted in some fashion, prohibits attorneys from representing two clients at the same time if their interests are “directly adverse” to one and another. Clients may choose to waive the rule if the lawyer believes he can provide “competent and diligent” representation and the lawyer isn’t representing two clients against each other in the same suit.

Kathleen Clark, a law professor at Washington University in St. Louis, Missouri, who specializes in legal ethics, said it’s hard to believe Boies did not know about the deception, given that the investigators submitted reports to the firm about their activities.

“One of the problems is the investigator hired was engaged in deception and developed an elaborate ruse to mislead a woman who apparently was allegedly raped by Weinstein,” Clark said. “The private investigator was essentially engaging in a fraudulent scheme and lawyers are not permitted to engage in fraud.”

Clark said legal “work product” doctrine, allowing attorneys to shield reports or research in anticipation of litigation from discovery, would not necessarily apply in this instance.

Related: Manhattan D.A. Plans to Present Harvey Weinstein Case to Grand Jury: Sources

“The contract that Boies signed seemed to assert that it had something to do with litigation support services but that same contract identifies an objective that had nothing to do with the litigation,” she said.

Bill Freivogel, a Chicago-based consultant to law firms on legal ethics and professional liability, said that in some instances attorneys will send out investigators under cover — for example, to look into housing discrimination. The investigators may act as potential buyers of a home although they are really there to investigate the discrimination.

“Some people think that is OK in that particular instance, but other than that, you are really playing with fire,” he said. "If I were representing The New York Times, I would never do what Boise said he did.”

On Tuesday, The New York Times issued a statement saying that it considered Boies’ conduct “intolerable, a “grave betrayal of trust” and “a breach of basic professional standards.”

“It is inexcusable and we will be pursuing appropriate remedies,” the statement said.

It was later announced that the newspaper had terminated its relationship with Boies.

Lester Brickman, a professor emeritus at Cardozo Law School, suggested that the situation raises what is often an ethically murky issue: the duty of loyalty.

Related: Producers Guild of America Bans Harvey Weinstein for Life

“How much loyalty do you owe a client when you take on another client?” he said. In reading the story, Brickman said he believes Boies’ argument is that he did not act against the interest of The New York Times, but rather that he was simply hiring investigators to engage in fact-gathering.

Brickman said the argument was, “I never took never took a position adverse to The Times in the First Amendment sense — I never did any work to inhibit The Times from reporting the news.”

But, George Freeman, executive director of the Media Law Resource Center, and a former lawyer for The Times, wasn’t buying it.

“Engaging contractors to find dirt on Times reporters is outrageous and clearly inappropriate,” he said.

Freeman said most media law attorneys would frown on such behavior.

"The media takes pretty seriously that you are either for us or against us, and you can’t hedge in the middle anywhere — that’s the culture," he said.

CORRECTION (Nov. 8, 2017, 3 p.m.): An earlier version of this article misspelled the last name of a Stanford law professor. Her name is Deborah Rhode, not Rhodes.