A new bill which criminalises doping has been passed by Kenya's parliament - easing fears that the athletics powerhouse will be banned from the Rio 2016 Olympics.
The African country had been given until May 2 to make the necessary changes to its anti-drugs measures by the World Anti-Doping Agency (WADA), with the new legislation now set to become law.
WADA imposed its deadline after Kenya's Government missed an February 11 cut-off point to establish the appropriate legal framework for the new Anti-Doping Agency of Kenya (ADAK).
As a result, the WADA Independent Compliance Review Committee ruled that Kenya were not in compliance with the WADA code as a Government bill had not yet been passed with policies and ADAK rules not in place.
Now, the new law could result in jail sentences of up to a year and fines for those who dope.
A preliminary reading of the bill had already been heard but the February deadline came and went as the parliament went into recess.
Kenya now seems to be in a stronger position to meet WADA criteria, and would have been declared non-compliant had they also missed the May date.
"The bill was passed and will await Presidential assent, which we expect to happen any time this week," Martin Mutua, head of media in parliament, told Reuters.
"Arrests and prosecution of people associated with doping will fall under Inspector General and not compliance officers as was envisaged by the bill.
"Being a sovereign state, we cannot allow other agencies to handle this sensitive aspect."
A non-compliant ruling by WADA would not have automatically meant a Rio 2016 suspension for Kenya, but a recommendation could have been made to a governing body such as the International Association of Athletics Federations (IAAF).
This was what happened with Russia last year following WADA's Independent Commission publishing allegations of state-supported doping, with the All-Russia Athletics Federation subsequently suspended by the IAAF.
Kenya, one of the leading world powers in middle and long distance running, has been regularly tainted by drug problems.
Around 40 from the country have tested positive for banned drugs since 2012, including three-times Boston Marathon winner Rita Jeptoo, who failed for erythropoietin in 2014.