After a worldwide search for a stem cell donor who could match the rare Thai-Italian background of a student suffering from leukaemia, one has been found – a chance described as “a needle in a haystack” when the hunt was launched.

The search for a matching donor for Lara Casalotti, from London but with Thai and Italian origin parents, was backed by celebrities including Stephen Fry, JK Rowling and Mark Wahlberg, who helped spread the word of the match4lara campaign through their social media posts.

The bonus is that the campaign not only found an anonymous donor for Casalotti, it persuaded more than 20,000 people across the world to register as bone marrow donors in less than two months, helping with a dire shortage of mixed-race and ethnic minority donors. Many students signed up at match4lara rallies, and more events already planned will go ahead even though her donor has been found.

An unprecedented number of those signing up came from black, Asian, ethnic minority or mixed race backgrounds in the UK – the donors in shortest supply, meaning that only one in five of those from such backgrounds who need a transplant get the best match.

Tests continue, but it is hoped her treatment will begin in March.

If you are Eurasian, you might be able to save this girl's life. Please go to https://t.co/oP24CINiOf — J.K. Rowling (@jk_rowling) January 11, 2016

Mixed race? You can do something wonderful with your unique identity - save a life. Do read this: https://t.co/YeeYXuuHFI #match4lara — Stephen Fry (@stephenfry) January 9, 2016

Casalotti , who is studying for a master’s in global migration at University College London, was in Thailand before Christmas working on a research project on conditions for migrant workers, when she went to the doctor because she thought she had pulled a muscle in her back.

To her shock she was told she had acute myeloid leukaemia, and her best chance was a bone marrow transplant. The search was launched by family and friends, working with donor registers in the UK, Italy, Thailand and the US, when her only brother proved not to be a match, and they were warned by the Anthony Nolan blood cancer charity that there was an acute shortage of possible donors worldwide.

Casalotti said: “These past months have been a whirlwind, but I am so thankful a donor with a genetic match has now been found.

“Thanks to everyone’s immense support, I have always stayed hopeful that I would find one, but I realise how lucky I have been, given how difficult it was to find that donor. I want to keep urge people to sign up to the donor registries so that everyone can have a chance of finding their match.”

Ann O’Leary, head of register development at the Anthony Nolan, said the impact of the campaign would be life-changing for many for years to come. “Any one of the thousands of people they have signed up could save the life of someone like Lara in the future,” she said.

Supanya Casalotti, the student’s mother, said: “As a mum, I feel pure relief as we knew that the odds were stacked against Lara. Whoever the donor is, they will never, ever know how grateful I am. The transplant is still a few weeks away and I wish I could wrap them in cotton wool to keep them safe!