Nikita Pearl Waligwa, a Ugandan child actress who starred in a Disney movie on the extraordinary life of a local chess prodigy, has died at the age of 15.

The teenage star of Queen of Katwe died of brain tumour, according to Gayaza High School, which she reportedly attended since 2018.

Waligwa, who played the role of Gloria, a younger friend of the main character in the 2016 film, was "a darling to many", the secondary school wrote on Twitter.

"No words can explain the pain at the moment," it added.

Indeed it's heart breaking. She will dearly be missed by everyone @gayazahigh . She was a darling to many. R.I.P Nikita https://t.co/txwiAEHBeb — Gayaza High School (@gayazahigh) February 16, 2020

Local media reported that Waligwa had first been diagnosed with a brain tumour in 2016. After making a recovery a year later, another tumour was found.

The news prompted an outpouring of grief on social media, users expressing their condolences and recalling her role in the movie directed by Mira Nair and filmed in Katwe, a slum in Uganda's capital, Kampala.

15 year old Nikita Pearl Waligwa,who starred as 'Gloria', in a Disney's movie, Queen of Katwe, is dead. Nikita succumbed to brain cancer on Saturday. Rest in peace little one. pic.twitter.com/WTjhicg4pz — Lucky Mbabazi (@LuckyMbabazi) February 16, 2020

"Nikita Pearl Waligwa was not only a star, but she was also an inspiration to every young girl," read an obituary in the online version of the New Vision, a Ugandan daily newspaper.

Queen of Katwe was based on the true story of Phiona Mutesi, an uneducated girl from the eponymous slum who took up chess in 2005 and overcame overwhelming odds to become the first female winner of Uganda's junior chess championships.

By the age of 17, she was representing the country at international competitions.

The film was received favourably in Uganda, where young people with no acting experience shared the limelight with stars such as Lupita Nyong'o, a Kenyan Oscar-winning actress, and Britain's David Oyelowo.

One of those Ugandans was Waligwa, who as Gloria explained to Phiona the rules of the game in the film.

"The small one can become the big one," is one of Gloria's memorable quotes from Queen of Katwe.