Kenya's President Uhuru Kenyatta signed into law on Friday an anti-doping bill required to avoid a ban from the Rio Olympics for a nation famed for its runners but tainted by a spate of doping cases in recent years.
The athletics world has been in turmoil since the World Anti-Doping Agency (WADA) issued a report in November citing widespread use of doping in the sport.
About 40 Kenyan athletes have been banned for doping in the last three years and several senior officials have also been suspended for misusing funds and other allegations.
Former Athletics Kenya chief executive Isaac Mwangi has been provisionally suspended for six months by the Ethics Board of the sport's world governing body, the IAAF, after being accused of seeking bribes to reduce doping suspensions of two athletes.
Flanked by senior government officials and sportsmen and women, Kenyatta was shown signing the bill into law in a video released by the president's office.
"Kenya is 100 percent committed to ensuring total compliance with international regulations on sports and athletics," he said at the signing ceremony, adding that the law is the continuation of efforts "to stand against cheating and corruption."
Kenya had been given a one-month extension on 7 April to comply with WADA regulations or face sanctions that could have included a ban from this year's Olympic Games in Rio de Janeiro.
"From today, anybody caught cheating must face the full force of the law and we can now train knowing that the world will accept our results," Asbel Kiprop, three-time world 1,500m champion, said.
The law, demanded by WADA, will criminalise doping in a country with a history of middle and long-distance running excellence, but tainted by recent doping cases.
"The world will now look at us differently," said Julius Kirwa, who coached the Kenyan team in last year's World Championships in Moscow.
Athletics Kenya President Jackson Tuwei said: "We can now prepare well for the Olympics knowing we shall participate."
Kenya had missed a February deadline to establish a legal framework for its Anti-Doping Agency of Kenya (ADAK).
Meanwhile, WADA has suspended the accreditation of the National Anti-Doping Laboratory in Beijing, China.
WADA announced the suspension late on Thursday, saying the suspension - which can be appealed - would last up to four months.
The statement said: "During the period of suspension, the laboratory is required to take five remedial steps highlighted by the disciplinary committee in its recommendation, in addition to addressing non-conformities identified in its External Quality Assessment Scheme (EQAS) program and any other non-conformities identified during WADA site visits during the suspension period.
"If the Beijing laboratory satisfies the disciplinary committee in meeting these requirements, the laboratory may apply for reinstatement prior to the expiry of the four month suspension period."
Earlier this month, WADA revoked the accreditation of Moscow's anti-doping laboratory, which was suspended in November after a WADA independent commission report alleged state-sponsored doping and cover-ups in Russia.