Kenya's High Court has halted a controversial biometric ID scheme until new data protection laws are enacted.
Sensitive information, such as contact details, fingerprints and a person's profession, was collected last year.
The idea was to integrate all the data the government has about an individual on various systems under one overarching ID number.
The judges ruled the move was constitutional as long as that information was properly protected.
In future Kenyan adults will need this new ID to access any government service, such as getting treatment at state hospitals, marrying or filing their tax returns.
A data protection act was passed in November, which will see the creation of a data commission.
But it is not clear how long it will take for this body to become operational and for the appointment of a commissioner to head it, reports the BBC's Ferdinand Omondi from the capital, Nairobi.
Until then the rollout of the scheme, known as Huduma Namba, has been put on hold by the panel of three judges.
What did the judges say?
As extensive personal details would be available at the click the button, they said that Kenyans would be at risk of suffering irreversible damage if the information was misused.
The judges also ruled that any collection of DNA and the use of GPS to record the precise location of a person's home was intrusive and unconstitutional.
The case was brought by the Kenya National Commission on Human Rights (KNCHR), the Kenya Human Rights Commission (KHRC), and the Nubian Rights Forum.
The Nubian community, which has been living in Kibera - a slum area of Nairobi - for more than a century, has been having difficulty getting Kenyan citizenship as they were originally brought to Kenya from Sudan during British colonial rule.
This means that many members of the ethnic group have not been able to register for Huduma Namba as they do not have the national IDs needed to do so.
They had wanted the whole scheme scrapped as the government says people will need a Huduma Namba ID to access public services.