Kenya President Uhuru Kenyatta has signed into law an anti-doping bill that could allow the country to compete at the Olympics Games in Rio in August.
It had missed two deadlines set by the World Anti-Doping Agency (Wada) to show it was tackling cheating in sport.
The new law creates a national agency, which allows those found guilty of doping to be imprisoned and fined.
Wada, which set a final deadline of 2 May for Kenya to pass the law, will meet on 12 May to discuss the case.
Since 2011, more than 40 Kenyan athletes have failed drugs tests and the country's athletics federation general manager, Isaac Mwangi, was suspended for six months in February.
International Association of Athletics Federations (IAAF) president Lord Coe threatened Kenya with a ban if it did not pass the bill into law.
It it fails to convince the Wada and the IAAF it is doing enough to tackle doping, some of the world's top athletes could miss Rio 2016.
Kenya topped the medal table at the 2015 World Championships in Beijing with seven golds.