Sarah Rainsford
Eastern Europe correspondent
Paul Whelan must have doubted this moment was ever going to come.
It has been 2,043 days since Federal Security Service (FSB) agents in balaclavas burst into his Moscow hotel room, pinned him to the ground and announced he was being arrested for espionage.
I followed Mr Whelan’s case closely in Moscow from the very start and remember the day he first arrived in court looking more like a dazed librarian than a dastardly intelligence agent.
His hands were cuffed and he was cradling a cardboard box containing his prison lunch.
He was too nervous to say much, at first, and I found out later he was being interrogated and threatened.
As time passed Mr Whelan found his voice and began to denounce his jailing, loudly.
Russia thinks it has caught James Bond, is how he put it one day, but in fact it got Mr Bean on holiday.
After he was sentenced to 16 years, we spoke at length by phone from prison – Mr Whelan always insisted on his innocence.
Born in Canada to British parents with Irish roots, he is a citizen of four countries – which made his arrest a big deal diplomatically.
Long before any trial, Russia’s foreign minister claimed Mr Whelan had been caught “red handed” committing espionage.
The court later heard he had been trying to get secret information from a friend – actually an FSB intelligence agent.
But no evidence was ever made public.
Mr Whelan, a former US Marine, was a fan of Russia and had visited several times.
When he was arrested, he was in Moscow for the wedding of an American friend to a Russian woman and had spent the morning leading the guests around the Kremlin, including the locals.
After his detention, I scoured his social media accounts for any contacts or clues.
Some people were too nervous to talk, given the serious charge.
But, all those who agreed to speak laughed at the idea that their friend could be involved in espionage.
“If he’s a spy,” one of them wrote to me, with multiple exclamation marks, “then I’m Michael Jackson”.
For a long time, Mr Whelan was relentlessly upbeat about his fate.
He was convinced the US government would get him out, even as relations between Russia and the West slid from awful to much worse.
Conditions in his prison camp, IK 17, were tough, locked up with “child rapists and murderers” as he once put it.
He studied Russian – even Tajik – wrote letters, read spy novels.
The rest of his time was spent sewing clothes in a prison workshop and the nights were interrupted, regularly, by the guards.
They would shine a torch in his face to check he had not escaped.
Despite all that, Mr Whelan told me he made a habit of singing his four national anthems out loud each morning – to annoy those guards and to keep his spirits up.
He called himself a political hostage and told me repeatedly the FSB agents who took him – even the judge who convicted him – had all assured him he would be swapped.
It is why he didn’t bother appealing his sentence.
But as time passed, so did two other prisoner exchanges between Russia and the US, and both times Mr Whelan missed out.
So when we spoke late last year, he admitted he felt abandoned by his government.
Officially designated “wrongfully detained”, he had been assured he was a priority, Mr Whelan told me.
Then he had been “left in the dust”.
That day on the phone he was despondent and frustrated like I had never heard before.
Aware talks to free Evan Gershkovich – the US journalist accused of espionage – were under way, he worried he had been left behind again.
Mr Whelan’s parents were ageing, his beloved dog Flora had died, he reminded me.
He felt his life was ebbing away.
Earlier this week, as rumours of a prisoner swap began flying, I called Mr Whelan’s old lawyer, Olga Karlova.
She had seen the reports and told me she had written to IK 17 asking whether Mr Whelan was there.
There was no reply.
It was a key sign an exchange was happening, likely a major one, although nothing was confirmed until it was all safely under way and could not be derailed.
Two days on, I’ve been watching pictures of Mr Whelan boarding a plane – no handcuffs, no prison uniform.
He looks a little dazed, presumably exhausted.
But five years after he landed in Moscow for a wedding party, he is at last heading home.