A charity set up by former prime minister Gordon Brown's wife Sarah after the death of their baby daughter helped save the life of former Labour leader John Smith's grandchild.

Jennifer Brown, who was born at 33 weeks, died after ten days in 2002, leading Mrs Brown to launch PiggyBankKids.

The organisation, now TheirWorld, was set up the Jennifer Brown Research Laboratory (JBRL) at Edinburgh University to lead research into premature babies.

Its pioneering work helped to save the life of Ella McConnachie, the granddaughter of late Labour leader John Smith, 15 years later.

The link had a personal twist as Mr Smith was a close friend of Mr Brown.

Mrs Brown said it was "really lovely" to see the charity work come to fruition.

Ella's mother Catherine Smith, 42, said she thought her father would be "very touched".

Little Ella was born at 28 weeks, weighing just 1lb 10oz

"I count myself very lucky that we got our baby home and I will be forever grateful," her mother said.

"When [Ella] was in hospital I suddenly realised that [Jennifer] had been in an almost identical ward. Of course, they'd had such a different outcome."

It was only when she went online to donate to the charity that she realised the work in the laboratory had been a direct factor in Ella's care.

"[My father] and Gordon were incredibly close," she said.

"I can remember climbing hills in Scotland with them ranting about economic policy all the way up and all the way down.

"He would have been so touched because it would have broken his heart, what happened. It would be very, very meaningful."

Mrs Brown said: "Fifteen years later, you look back at quite a legacy of work by these remarkable scientists and to just know how that tracks through, where baby Ella is here today because of that work, is a really lovely feeling."

Speaking about the aftermath of Jennifer's death, Mrs Brown said: "Everything was very public for us, understandably.

"At the same time, you are coping with your own very personal tragedy right at the centre of it.

"But I was overwhelmed with letters that I received from people and mums who had lost their own babies, some of them 50 years earlier, saying it's always with you, it's always part of you."

Her husband described Catherine's father Mr Smith as "my friend, my colleague, my mentor", saying the politician is still "sorely missed" 23 years after his death.

Mr Brown said he and his wife are "so proud" to see what has been achieved by staff at the JBRL.

He said: "Sarah and I never had the joy of experiencing Jennifer taking her first steps, or speaking her first words, or going to school for the first time.

"But we have realised that after 15 years, out of tragedy some good can come."