Donald Trump has described as "fake news" allegations published in some media that his election team colluded with Russia - and that Russia held compromising material about his private life. The BBC's Paul Wood saw the allegations before the election, and reports on the fallout now they have come to light.
The significance of these allegations is that, if true, the president-elect of the United States would be vulnerable to blackmail by the Russians.
I understand the CIA believes it is credible that the Kremlin has such kompromat - or compromising material - on the next US commander in chief. At the same time a joint taskforce, which includes the CIA and the FBI, has been investigating allegations that the Russians may have sent money to Mr Trump's organisation or his election campaign.
Claims about a Russian blackmail tape were made in one of a series of reports written by a former British intelligence agent, understood to be Christopher Steele.
As a member of MI6, he had been posted to the UK's embassy in Moscow and now runs a consultancy giving advice on doing business in Russia. He spoke to a number of his old contacts in the FSB, the successor to the KGB, paying some of them for information.
They told him that Mr Trump had been filmed with a group of prostitutes in the presidential suite of Moscow's Ritz-Carlton hotel. I know this because the Washington political research company that commissioned his report showed it to me during the final week of the election campaign.
The BBC decided not to use it then, for the very good reason that without seeing the tape - if it exists - we could not know if the claims were true. The detail of the allegations were certainly lurid. The entire series of reports has now been posted by BuzzFeed.
Mr Trump's supporters say this is a politically motivated attack.
The president-elect himself, outraged, tweeted this morning: "Are we living in Nazi Germany?"
Later, at his much-awaited news conference, he was unrestrained.
"A thing like that should have never been written," he said, "and certainly should never have been released."
He said the memo was written by "sick people [who] put that crap together".
The opposition research firm that commissioned the report had worked first for an anti-Trump superpac - political action committee - during the Republican primaries.
Then during the general election, it was funded by an anonymous Democratic Party supporter. But these are not political hacks - their usual line of work is country analysis and commercial risk assessment, similar to the former MI6 agent's consultancy. He, apparently, gave his dossier to the FBI against the firm's advice.
And the former MI6 agent is not the only source for the claim about Russian kompromat on the president-elect. Back in August, a retired spy told me he had been informed of its existence by "the head of an East European intelligence agency".
Later, I used an intermediary to pass some questions to active duty CIA officers dealing with the case file - they would not speak to me directly. I got a message back that there was "more than one tape", "audio and video", on "more than one date", in "more than one place" - in the Ritz-Carlton in Moscow and also in St Petersburg - and that the material was "of a sexual nature".
'Be very careful'
The claims of Russian kompromat on Mr Trump were "credible", the CIA believed. That is why - according to the New York Times and Washington Post - these claims ended up on President Barack Obama's desk last week, a briefing document also given to Congressional leaders and to Mr Trump himself.
Mr Trump did visit Moscow in November 2013, the date the main tape is supposed to have been made. There is TV footage of him at the Miss Universe contest. Any visitor to a grand hotel in Moscow would be wise to assume that their room comes equipped with hidden cameras and microphones as well as a mini-bar.
At his news conference, Mr Trump said he warned his staff when they travelled: "Be very careful, because in your hotel rooms and no matter where you go you're going to probably have cameras." So the Russian security services have made obtaining kompromat an art form.
One Russian specialist told me that Vladimir Putin himself sometimes says there is kompromat on him - though perhaps he is joking. The specialist went on to tell me that FSB officers are prone to boasting about having tapes on public figures, and to be careful of any statements they might make.
A former CIA officer told me he had spoken by phone to a serving FSB officer who talked about the tapes. He concluded: "It's hokey as hell."
Mr Trump and his supporters are right to point out that these are unsubstantiated allegations.
But it is not just sex, it is money too. The former MI6 agent's report detailed alleged attempts by the Kremlin to offer Mr Trump lucrative "sweetheart deals" in Russia that would buy his loyalty.
Mr Trump turned these down, and indeed has done little real business in Russia. But a joint intelligence and law enforcement taskforce has been looking at allegations that the Kremlin paid money to his campaign through his associates.
On 15 October, the US secret intelligence court issued a warrant to investigate two Russian banks. This news was given to me by several sources and corroborated by someone I will identify only as a senior member of the US intelligence community. He would never volunteer anything - giving up classified information would be illegal - but he would confirm or deny what I had heard from other sources.
"I'm going to write a story that says…" I would say. "I don't have a problem with that," he would reply, if my information was accurate. He confirmed the sequence of events below.
Last April, the CIA director was shown intelligence that worried him. It was - allegedly - a tape recording of a conversation about money from the Kremlin going into the US presidential campaign.
It was passed to the US by an intelligence agency of one of the Baltic States. The CIA cannot act domestically against American citizens so a joint counter-intelligence taskforce was created.
The taskforce included six agencies or departments of government. Dealing with the domestic, US, side of the inquiry, were the FBI, the Department of the Treasury, and the Department of Justice. For the foreign and intelligence aspects of the investigation, there were another three agencies: the CIA, the Office of the Director of National Intelligence and the National Security Agency, responsible for electronic spying.
Lawyers from the National Security Division in the Department of Justice then drew up an application. They took it to the secret US court that deals with intelligence, the Fisa court, named after the Foreign Intelligence Surveillance Act. They wanted permission to intercept the electronic records from two Russian banks.
Their first application, in June, was rejected outright by the judge. They returned with a more narrowly drawn order in July and were rejected again. Finally, before a new judge, the order was granted, on 15 October, three weeks before election day.
Neither Mr Trump nor his associates are named in the Fisa order, which would only cover foreign citizens or foreign entities - in this case the Russian banks. But ultimately, the investigation is looking for transfers of money from Russia to the United States, each one, if proved, a felony offence.
A lawyer- outside the Department of Justice but familiar with the case - told me that three of Mr Trump's associates were the subject of the inquiry. "But it's clear this is about Trump," he said.
I spoke to all three of those identified by this source. All of them emphatically denied any wrongdoing. "Hogwash," said one. "Bullshit," said another. Of the two Russian banks, one denied any wrongdoing, while the other did not respond to a request for comment.
The investigation was active going into the election. During that period, the leader of the Democrats in the Senate, Harry Reid, wrote to the director of the FBI, accusing him of holding back "explosive information" about Mr Trump.
Mr Reid sent his letter after getting an intelligence briefing, along with other senior figures in Congress. Only eight people were present: the chairs and ranking minority members of the House and Senate intelligence committees, and the leaders of the Democratic and Republican parties in Congress, the "gang of eight" as they are sometimes called. Normally, senior staff attend "gang of eight" intelligence briefings, but not this time. The Congressional leaders were not even allowed to take notes.
In the letter to the FBI director, James Comey, Mr Reid said: "In my communications with you and other top officials in the national security community, it has become clear that you possess explosive information about close ties and co-ordination between Donald Trump, his top advisers, and the Russian government - a foreign interest openly hostile to the United States, which Mr Trump praises at every opportunity.
"The public has a right to know this information. I wrote to you months ago calling for this information to be released to the public. There is no danger to American interests from releasing it. And yet, you continue to resist calls to inform the public of this critical information."
The CIA, FBI, Justice and Treasury all refused to comment when I approached them after hearing about the Fisa warrant.
It is not clear what will happen to the inter-agency investigation under President Trump - or even if the taskforce is continuing its work now. The Russians have denied any attempt to influence the president-elect - with either money or a blackmail tape.
If a tape exists, the Russians would hardly give it up, though some hope to encourage a disloyal FSB officer who might want to make some serious money. Before the election, Larry Flynt, publisher of the pornographic magazine Hustler, put up a million dollars for incriminating tape of Mr Trump. Penthouse has now followed with its own offer of a million dollars for the Ritz-Carlton tape (if it exists).
It is an extraordinary situation, 10 days before Mr Trump is sworn into office, but it was foreshadowed during the campaign.
During the final presidential debate, Hillary Clinton called Donald Trump a "puppet" of Russia's leader, Vladimir Putin. "No puppet. No puppet," Mr Trump interjected, talking over Mrs Clinton. "You're the puppet. No, you're the puppet."
In a New York Times op-ed in August, the former director of the CIA, Michael Morell, wrote: "In the intelligence business, we would say that Mr Putin had recruited Mr Trump as an unwitting agent of the Russian Federation."
Agent; puppet - both terms imply some measure of influence or control by Moscow.
Michael Hayden, former head of both the CIA and the NSA, simply called Mr Trump a "polezni durak" - a useful fool.
The background to those statements was information held - at the time - within the intelligence community. Now all Americans have heard the claims. Little more than a week before his inauguration, they will have to decide if their president-elect really was being blackmailed by Moscow.
Clarification: 11 January - This article was amended to make clear that the opposition research firm which commissioned the report had first worked for an anti-Trump political action committee.