SOMETIMES against all the odds and everyone’s predictions the right thing actually happens.

That was what it felt like last week to hear the joyous news that Nazanin Zaghari-Ratcliffe and Anoosheh Ashoori have been released from captivity in Iran.

Of course great sadness and worry remains that the remaining dual national Morad Tabhaz is still in Iran.

He too is innocent and must be allowed to rejoin his family. But the fact that a resolution was possible for Nazanin and Anoosheh should surely give him hope too.

When I was a very green health secretary I remember meeting patient safety campaigners who had lost loved ones at Mid Staffs and Morecambe Bay.

One of them, James Titcombe, had to write 400 letters and emails over seven years before the authorities would finally admit why his baby Joshua died.

He and other brave families gave me my purpose or ‘true north’ in that very difficult job: to be a voice for patients and champion higher standards of safety and quality of care.

It is for others to judge whether I succeeded or not but I certainly would not have stuck at that job without knowing so clearly in my own mind why I was there.

Richard Ratcliffe, Nazanin’s brave husband, did the same thing for me as foreign secretary.

Officials were initially very nervous about me having a face-to-face meeting with Richard. But I thought what is the point of being a democracy if people at the top don’t make time for ordinary families in difficulty?

When I met him, I found a sincere, modest man utterly determined to do everything it took to get Nazanin home.

He was also determined to end the vile practice of hostage taking for diplomatic purposes – helping not just his families but many others.

The first time I spoke to Nazanin as foreign secretary was never publicised but I remember sitting at home with moist eyes as I spoke to this dignified, non-political woman enduring so much unjustified suffering.

Like James Titcombe when I was health secretary, Richard and Nazanin too gave me my ‘true north’ or sense of moral purpose as foreign secretary.

I was the first one to say publicly Nazanin was innocent and gave her diplomatic protection, a decision which gave me one of my only sleepless nights on the job.

I also made it clear to my department that helping innocent British citizens in difficulty should always be a top priority.

This was not just because any government should seek to put right injustice and suffering but for an even more profound reason: if we wish to champion human rights and democratic values around the world, then we need to start by leaving no stone unturned when it comes to tragedies faced by our own citizens.

There are many issues to be learned from Nazanin and Anoosheh’s detention and why it took so long to get them home.

But we should also recognise that it was a huge diplomatic achievement for the Foreign Office and the foreign secretary Liz Truss given the complexity of settling a historic debt and the sanctions currently in place.

However, as we think about the crisis in Ukraine, I hope we will also think about the broader lessons for those of us who support open and democratic societies.

Our robust response to Putin’s genocidal invasion has surprised even ourselves.

If we can unite to stop countries marching into their neighbours, we can surely unite to stamp out the 19th-century practice of holding innocent people captive as a tool of diplomatic leverage.

Then the agony suffered by Nazanin, Anoosheh, Morad and their families will be consigned to the history books where it belongs.