WASHINGTON — Seven months ago, a respected former British spy named Christopher Steele won a contract to build a file on Donald J. Trump’s ties to Russia. Last week, his lurid account — unsubstantiated accounts of frolics with prostitutes, real estate deals that were intended as bribes and coordination with Russian intelligence of the hacking of Democrats — was summarized for Mr. Trump in an appendix to a top-secret intelligence report.
The consequences have been incalculable and will play out long past Inauguration Day. Word of the summary, which was also given to President Obama and to congressional leaders, leaked to CNN on Tuesday, and the rest of the media followed with sensational reports.
Mr. Trump denounced the unproven claims Wednesday as a fabrication, a Nazi-style slander concocted by “sick people.” It has further undermined, at least temporarily, his relationship with the intelligence agencies and cast a shadow over the new administration.
Parts of the story remain out of reach — most critically the basic question of how much, if anything, in the dossier is true. But it is possible to piece together a rough narrative of what led to the current crisis, including lingering questions about the ties binding Mr. Trump and his team to Russia. The episode also offers a glimpse of the hidden side of presidential campaigns, involving private sleuths-for-hire looking for the worst they can find about the next American leader.
The story began in September 2015, when a wealthy Republican donor who strongly opposed Mr. Trump put up the money to hire a Washington research firm run by former journalists, Fusion GPS, to compile a dossier about the real estate magnate’s past scandals and weaknesses, according to a person familiar with the effort. The person described the opposition research work on condition of anonymity, citing the volatile nature of the story and the likelihood of future legal disputes. The identity of the donor who funded the effort is unclear.
Fusion GPS, headed by a former Wall Street Journal journalist known for his dogged reporting, Glenn Simpson, most often works for business clients. But in presidential elections, the firm is sometimes hired by candidates, party organizations or donors to do political “oppo” work — shorthand for opposition research — on the side.
It is routine work and ordinarily involves creating a big, searchable database of public information: past news reports, documents from lawsuits and other relevant data. For months, Fusion GPS gathered the documents and put together the files from Mr. Trump’s past in business and entertainment, a rich target.
After Mr. Trump emerged as the presumptive Republican nominee in the spring, the Republicans no longer wanted to finance the effort. But Democratic supporters of Hillary Clinton were very interested, and Fusion GPS kept doing the same deep dives into Mr. Trump’s record, but on behalf of new clients.
In June, the tenor of the effort suddenly changed. The Washington Post reportedthat the Democratic National Committee had been hacked, apparently by Russian government agents, and a mysterious figure calling himself “Guccifer 2.0”began to publish the stolen documents online.
Mr. Simpson hired Mr. Steele, a former British intelligence officer with whom he had worked before. Mr. Steele, in his early 50s, had served undercover in Moscow in the early 1990s and later was the top expert on Russia at the London headquarters of Britain’s spy service, MI6. When he stepped down in 2009, he started his own commercial intelligence firm, Orbis Business Intelligence.
The former journalist and the former spy, according to people who know them, had a similar dark view of President Vladimir V. Putin of Russia, a former K.G.B. officer, and the varied tactics he and his intelligence operatives used to smear, blackmail or bribe their targets.
As a former spy who had carried out espionage inside Russia, Mr. Steele was in no position to travel to Moscow to study Mr. Trump’s connections there. Instead, he hired native Russian speakers to call informants inside Russia and made surreptitious contact with his own connections in the country as well.
Mr. Steele wrote up his findings in a series of memos, each a few pages long, that he began to deliver to Fusion GPS in June and continued at least until December. By then, the election was over, and neither Mr. Steele nor Mr. Simpson had a client to pay them, but they did not stop what they believed to be very important work. (Mr. Simpson declined to comment for this article, and Mr. Steele did not immediately reply to a request for comment.)
The memos described two different Russian operations. The first was a yearslong effort to find a way to influence Mr. Trump, perhaps because he had contacts with Russian oligarchs whom Mr. Putin wanted to keep close track of. According to Mr. Steele’s memos, it used an array of familiar Russian tactics: the gathering of “kompromat,” compromising material such as alleged tapes of Mr. Trump with prostitutes in a Moscow hotel, and proposals for business deals attractive to Mr. Trump to win his allegiance.
The goal would probably never have been to make Mr. Trump a knowing agent of Russia, but to make him a source who might provide information to friendly Russian contacts. But if Mr. Putin and his agents wanted to entangle Mr. Trump using business deals, they did not do it very successfully — Mr. Trump has said he has no major properties inside Russia.
The second Russian operation described was recent: a series of contacts with Mr. Trump’s representatives during the campaign, in part to discuss the hacking of the Democratic National Committee and Mrs. Clinton’s campaign chairman, John D. Podesta. According to Mr. Steele’s sources, it involved, among other things, a late-summer meeting in Prague between Michael Cohen, a lawyer for Mr. Trump, and Oleg Solodukhin, a Russian official who works for Rossotrudnichestvo, an organization that promotes Russia’s interests abroad.
By all accounts, Mr. Steele has an excellent reputation with American and British intelligence colleagues and had done work for the F.B.I. on the investigation of bribery at FIFA, soccer’s global governing body. Colleagues say he was acutely aware of the danger he and his associates were being fed Russian disinformation. Russian intelligence had mounted a complex hacking and leaking operation to damage Mrs. Clinton, after all, and a similar operation against Mr. Trump was an obvious possibility.
But much of what he was told, and passed on to Fusion GPS, was very difficult to check. And some of the claims that can be checked seem problematic. Mr. Cohen, for instance, said on Twitter on Tuesday night that he has never been in Prague; Mr. Solodukhin, his purported Russian contact, denied in a telephone interview that he had ever met Mr. Cohen or anyone associated with Mr. Trump. The president-elect on Wednesday cited news reports that a different Michael Cohen with no Trump ties may have visited Prague and that the two Cohens might have been mixed up in Mr. Steele’s reports.
But word of a dossier had begun to spread through political circles. Rick Wilson, a Republican political operative who was working for a “super PAC” supporting Marco Rubio, said he heard about it in July, when an investigative reporter for a major news network called him to ask what he knew. Other campaigns and super PACs were also developing more limited opposition research into Mr. Trump’s Russia ties.
By early fall, some of Mr. Steele’s memos had been given to the F.B.I. and to journalists. An MI6 official, whose job does not permit him to be quoted by name, said that in late summer or early fall, Mr. Steele also passed the reports he had prepared on Mr. Trump and Russia to British intelligence. Mr. Steele was concerned about what he was hearing about Mr. Trump, and he thought that the information should not be solely in the hands of people looking to win a political contest.
After the election, the memos, still being supplemented by his inquiries, became one of Washington’s worst-kept secrets, as reporters scrambled to try to confirm or disprove their contents.
Word also reached Capitol Hill. Senator John McCain, Republican of Arizona, heard about the dossier and obtained a copy in December from David J. Kramer, a former top State Department official who works for the McCain Institute at Arizona State University. Mr. McCain passed the information to James B. Comey, the F.B.I. director.
Remarkably for Washington, many reporters for competing news organizations had the salacious and damning memos, but they did not leak, because their contents could not be confirmed. That changed only this week, after the heads of the C.I.A., the F.B.I. and the National Security Agency added a summary of the memos, along with information gathered form other intelligence sources, to their report on the Russian cyberattack on the election.
Now, after the most contentious of elections, Americans are divided and confused about what to believe about the incoming president. And there is no prospect soon for full clarity on the veracity of the claims made against him.
“It is a remarkable moment in history,” said Mr. Wilson, the Florida political operative. “What world did I wake up in?”