Kenya's president has signed into law a bill which legalises the traditional home-brewed spirit changaa.
The Alcoholic Drinks Control Bill is partly intended to stop people from dying after drinking adulterated moonshine.
The BBC's Angela Ny'endo in Nairobi says at least 100 people have died in such cases this year.
The bill also makes bars and brewers display prominent health warnings about the dangers of alcohol.
The bill takes effect in 90 days' time.
By legalising changaa, officials hope to take business away from establishments where toxic chemicals are added to the brew to make it stronger - sometimes with deadly results.
Changaa is normally made from millet or maize.
The bill also introduces safety regulations, although some MPs have questioned how these rules will be enforced.
Changaa is much cheaper than other alcoholic drinks, making it the beverage of choice for thousands of Kenyans.
However, some point out that under the new bill, changaa can only be sold in glass bottles, which would increase the cost.
This could mean some people will continue to drink the illicit - and potentially poisonous - brews.
Some MPs have resisted the new bill - some saying changaa should remain illegal