WASHINGTON — The presidential campaign of Hillary Clinton and the Democratic National Committee paid for research that was included in a dossier made public in January that contained salacious claims about connections between Donald J. Trump, his associates and Russia.

A spokesperson for a law firm said on Tuesday that it had hired Washington-based researchers last year to gather damaging information about Mr. Trump on numerous subjects — including possible ties to Russia — on behalf of the Clinton campaign and the D.N.C.

The president and his allies have argued for months that the investigations are politically motivated. They have challenged the information contained in the dossier, which was compiled by a former British spy who had been contracted by the Washington research firm Fusion GPS.

The letter that was filed in court said that Fusion GPS began working for the law firm, Perkins Coie, in April 2016. Written by the firm’s general counsel, Matthew J. Gehringer, the letter said that Fusion GPS had already been conducting the research “for one or more other clients during the Republican primary contest.”

Perkins Coie was paid $12.4 million to represent the Clinton campaign and the D.N.C. during the 2016 campaign, according to filings. The role of the Clinton campaign and the national party in funding the research for the dossier was first reported on Tuesday by The Washington Post.

At the time that Democrats began paying for the research, Mr. Trump was in the process of clinching the Republican presidential nomination, and Ms. Clinton’s allies were scrambling to figure out how to run against a candidate who had already weathered attacks from Republican rivals about his shifting policy positions, his character and his business record.

Fusion GPS hired Christopher Steele, a respected former British spy with extensive experience in Russia, to conduct research into any possible connections between Mr. Trump, his businesses, campaign team and Russia.

Mr. Steele produced a series of memos that alleged a broad conspiracy between the Trump campaign and the Russian government to influence the 2016 election on behalf of Mr. Trump. The memos also contained unsubstantiated accounts of encounters between Mr. Trump and Russian prostitutes, and real estate deals that were intended as bribes.

The contents of the memos circulated in Washington in late 2016, and were briefed to Mr. Trump by senior American intelligence officials during the presidential transition. The memos, which became known as the “Steele Dossier,” were made public by Buzzfeed — sparking an ongoing debate about their accuracy and about who funded the research.

Fusion GPS was started by three former Wall Street Journal employees. The firm worked directly with Perkins Coie and its lead election lawyer, Marc Elias, according to the law firm spokesperson, who spoke on condition of anonymity to discuss sensitive information about confidential business relationships. The law firm’s payments to Fusion GPS for the Russia research ended just before Election Day, the spokesperson said.

The spokesperson said that neither the Clinton campaign, nor the D.N.C., was aware that Fusion GPS had been hired to conduct the research.

Earlier this year, Mr. Elias had denied that he had possessed the dossier before the election.

Anita Dunn, a veteran Democratic operative working with Perkins Coie, said on Tuesday that Mr. Elias “was certainly familiar with some of, but not all, of the information” in the dossier. But, she said “he didn’t have and hadn’t seen the full document, nor was he involved in pitching it to reporters.” And Mr. Elias “was not at liberty to confirm Perkins Coie as the client at that point,” Ms. Dunn said.

Image

Hillary Clinton with Brian Fallon, her campaign’s national press secretary, last year. On Tuesday, Mr. Fallon said he did not know that the author of a dossier on Mr. Trump was working on behalf of Mrs. Clinton’s campaign.CreditBrendan Smialowski/Agence France-Presse — Getty Images

Brian Fallon, who served as a spokesman for the Clinton campaign, on Tuesday wrote on Twitter that he did not know that Mr. Steele had been working on behalf of the Clinton campaign before the election.

“If I had, I would have volunteered to go to Europe and try to help him,” Mr. Fallon wrote.

A lawyer and spokeswoman for Fusion GPS did not respond to requests for comment.

A spokeswoman for the D.N.C. sought to distance the national party from the work, noting that the party’s chairman, Tom Perez, was elected only after last year’s election. He and his leadership team “were not involved in any decision-making regarding Fusion GPS, nor were they aware that Perkins Coie was working with the organization,” said Xochitl Hinojosa, the D.N.C. spokeswoman.

The work by Fusion GPS on the dossier has come under scrutiny from congressional investigators, who have questioned one of its founders and subpoenaed its banking records to try to determine who funded the research.

Fusion GPS is fighting the subpoena in federal court, and Mr. Gehringer’s letter was produced in connection with that legal case.

In the letter, Mr. Gehringer praised Fusion GPS for its “efforts to fulfill your obligation to maintain client confidentiality. In the circumstances, however, we believe it is appropriate to release Fusion GPS from this obligation as it relates to the identity of Perkins Coie.”

Mr. Gehringer added that, “given the interest in this issue, we believe it would be appropriate for all parties who hired Fusion GPS in connection with the 2016 presidential campaign to release Fusion GPS from this obligation as well.”

Correction:

Because of an editing error, an earlier version of this article misstated the position of Matthew J. Gehringer at the law firm Perkins Coie. He is the general counsel, not a managing partner.

Maggie Haberman contributed reporting.

A version of this article appears in print on , on Page A17 of the New York edition with the headline: Clinton Campaign and D.N.C. Helped to Pay for Russia Dossier on Trump. Order Reprints | Today’s Paper | Subscribe