While the United States did not stop the Russian invasion of Ukraine, the Biden administration seemed to see it coming in extraordinary detail.
In the weeks leading up to the invasion on February 24, as Russia amassed troops and hardware on its neighbour's borders, senior US officials warned an attack was imminent, despite repeated Kremlin denials.
As Russia menaced Ukraine from afar, even the Ukrainian government at times dismissed the build-up as bluster rather than a precursor to war.
Reporters asked US President Joe Biden why he was so convinced that his Russian counterpart Vladimir Putin had decided to invade Ukraine.
"We have a significant intelligence capability," he responded simply.
Mr Biden also claimed to know exactly what Mr Putin had in the pipeline — down to specific dates.
It was as if US intelligence services had tapped into the mind of a foreign leader notorious for guarding his secrets.
So was the US bluffing or did it really know what Russia had planned?
The possibility of a mole in the Kremlin
As a former spy master, Mr Putin knows the importance of intelligence and minimising the ability of your enemies, real or perceived, to know your plans.
He reportedly still relies on tactics he learned as a KGB agent.
To this day he does not trust technology, knowing that the United States maintains extraordinary hacking ability in its Central Intelligence Agency (CIA) and National Security Agency (NSA).
"It's said that he very, very rarely uses email and his calls are very selectively used," said Calder Walton, a historian and intelligence expert at the Harvard Kennedy School.
The widely circulated photos of him sitting at the head of comically long tables to meet with world leaders and his own team is the perfect metaphor for a man trying to keep threats at bay.
Despite those safeguards, however, it appears the United States knew of his invasion plans well in advance and was confident enough to put its assessment on the record.
The US would have been mining a range of sources, according to Mr Walton.
"I'd be confident to say that it is not one single source, but likely a combination: human sources potentially, people close to Putin ... the age-old technique of tradecraft, of espionage, recruiting spies," he said.
But there are other more modern tricks in the current intelligence toolkit, according to Mr Walton.
These include "technical intelligence collection", which often relies on satellite imagery and "open-source intelligence".
The technique draws on the vast amount of data now available from commercial satellites and even social media to establish your enemy's next steps.
The US has cracked the Russian inner sanctum before
There's a long history of espionage between the United States and Russia and its forebear, the Soviet Union.
For much of the Cold War, double agents and undercover spies were operating in both nations.
In 2010, long after the Cold War was declared over, the FBI arrested a network of Russian intelligence agents carrying out deep-cover assignments while living seemingly ordinary lives in American suburbs.
But the most recent and impactful example of alleged Russian espionage was the 2016 election.
According to the US intelligence community, Mr Putin ordered an operation to harm Hillary Clinton's campaign, boost Donald Trump's candidacy, and increase social discord in the United States.
The intelligence about Mr Putin's alleged involvement was given to the US by a Russian informant, according to Calder Walton.
"The key bit of intelligence saying that it was directly ordered by Putin ... was a human source and that human source was reportedly exfiltrated out of Russia under CIA protection," he said.
Within the FBI, the acronym used to describe the motivation for people to spy for a foreign power is MICE: Money, ideology, coercion and ego.
Trying to seduce people in Moscow could be fraught, Mr Walton said, so it was likely the US had tried to access Russian government officials placed in foreign capitals.
But those working for the Kremlin abroad in jobs such as diplomatic posts could also be spying for their motherland.
The US recently expelled a group of Russians working in New York for the United Nations Russian mission.
"There's a longstanding tradition for Russia to use diplomatic cover, particularly at the United Nations, for espionage to recruit foreign agents," Mr Walton said.
"It has to be said that almost certainly Western governments do the same."
Purges and paranoia in the Kremlin
While the US knew many details about Russia's plan to start the war, many were surprised by how badly this invasion has gone.
Despite heavy investment in its military over a decade, the once feared Russian army's reputation has taken a pummelling.
Instead of the rapid victory many had predicted, it's been stalled by the ferocious resistance of a much smaller country.
That has made intelligence gathering during the war far easier.
Russian units appear to be operating using non-secure communication, allowing Ukrainians to intercept their messages and then pinpoint both units and high-value targets.
Ukraine has managed to target and reportedly kill seven Russian generals in the month-old conflict, a rate of attrition not seen since World War II.
With his troops in trouble, his wealthiest allies sanctioned, and information leaking to his enemies, Vladimir Putin may be getting nervous.
The Russian leader is reportedly conducting an internal purge of officers and intelligence personnel, according to the Institute for the Study of War.
"If he fails and looks weak, it's disastrous at home, not just abroad," Fiona Hill, a former director of Russian affairs on the US National Security Council, told Meet the Press.
Mr Putin, who filled his inner circle with men connected to Russia's intelligence services, may now see them as a potential threat to his leadership.
"There's certainly a history of coups and more importantly, failed coups have always involved Russia's Soviet intelligence services," Mr Walton said.
"The KGB was instrumental in a failed coup in 1991 when they tried to oust Gorbachev, and the KGB was instrumental in the fall of Khrushchev in the earlier Cold War."
However, Mr Walton said Mr Putin's iron grip on Russia's intelligence services meant a coup against him would be difficult.
"He controls them in a way that even in the Soviet period, Soviet leaders didn't. These are his own personal fiefdoms," he said.
"I'm afraid the history of coups and Russia shows it's unlikely to succeed."