Audio By Carbonatix
A top South African court has cleared the way for an eight-year-old girl, born to Cuban parents, to be granted South African citizenship.
This entitles her to access to health care, education and other welfare services which she had been denied.
As her parents have been out of Cuba for some time, the girl had been unable to claim Cuban citizenship and she had been effectively left "stateless".
This test case will affect other children in such legal limbo.
The case has been going through the South African courts for several years, and the Supreme Court of Appeal's decision came after the government challenged a ruling brought by a lower court.
The BBC's Karen Allen in Johannesburg says the home affairs ministry had argued that granting the girl a South African birth certificate would open the floodgates to new applications.
The court's judgement is a reaffirmation of existing laws in South Africa which give citizenship to stateless children.
The Supreme Court of Appeal gave the government 18 months to get its house in order and put in place a mechanism for processing similar claims.
Lawyers say the implementation of this ruling would bring South Africa into line with many other countries.
It could also help many of the thousands of stateless youngsters born in South Africa, who are now being put up for adoption and whose birth parents were foreign migrants or refugees, our reporter says.
A spokesman for South Africa's Department of Home affairs said it welcomed the chance to re-evaluate its position.
South Africa is home to many African migrants who have moved to the country for better economic fortunes in one of the continent's largest economies or to seek political refuge.
Latest Stories
-
[Video] Singer Paul Okoye of P-Square falls off stage during performance in Australia
4 minutes -
‘Why your papa no hustle’ – Davido blasts T-Dot for calling him daddy’s boy
10 minutes -
Many musicians far more talented than me but not heard – Asake
22 minutes -
Trump pulls Surgeon General pick after nomination stalls
27 minutes -
Apple hails ‘extraordinary’ iPhone demand as boss Tim Cook heads out
37 minutes -
US judge rejects Trump administration’s halt on immigration applications
47 minutes -
Amnesty urges Nigeria to investigate deaths in army-run camp, military says report baseless
56 minutes -
Cocoa buyers divert funds to purchase smuggled beans, COCOBOD says
1 hour -
Myanmar ex-leader Aung San Suu Kyi moved to house arrest, military says
1 hour -
Violence in Australian town after arrest of man over girl’s murder
1 hour -
King arrives in Bermuda after ending US trip with visit to small town America
2 hours -
Trainee driver crashes bus into River Seine
2 hours -
UK terrorism threat level raised to severe after Golders Green attack
2 hours -
Twitch streamer hit by car live on camera – ‘It felt like slow motion’
2 hours -
OpenAI tells ChatGPT models to stop talking about goblins
2 hours