Still reeling from the sudden death of a young pitcher, Major League Baseball and its players’ union have agreed to a policy under which players will be tested for opioids and cocaine.

The policy, which was announced Thursday, comes a little more than five months after the Los Angeles Angels’ Tyler Skaggs was found dead in a hotel room in Dallas. Skaggs, who was only 27, died after choking on his own vomit, and was found by an examiner to have alcohol and two opioid-based painkillers, fentanyl and oxycodone, in his system.

The untimely death prompted discussion for the new drug testing policy, which is expected to take effect next season.

“The opioid epidemic in our country is an issue of significant concern to Major League Baseball,” deputy commissioner and chief legal officer Dan Halem said in a statement, as quoted by ESPN. “It is our hope that this agreement — which is based on principles of prevention, treatment, awareness and education — will help protect the health and safety of our Players.”

Baseball Players On Board

Tony Clark, the executive director of the Major League Baseball Players Association, said that the league’s players “are overwhelmingly in favor of expanding our drug-testing regimen to include opioids and want to take a leadership role in helping to resolve this national epidemic.”

The policy change also includes a reclassification of how the league approaches marijuana, which ESPN reported will now be treated the same as alcohol, which means players will be referred to voluntary treatment. Previously, players who didn’t go along with the treatment plan for marijuana were were subject to fines.

That punishment is now out, and players in both the major and minor leagues will be able to use marijuana to treat injuries without the prospect of discipline from the league office. That’s a potentially milestone precedent, as other professional sports leagues increasingly consider allowing players to use cannabis as a method of pain treatment instead of deadly prescription painkillers.

The National Football League, which lists marijuana as a banned substance, launched a study earlier this year in conjunction with its own players’ union to examine the potential of medical cannabis, as well as the use of prescription drugs by its players.

NFL players are regularly tested for banned substances, and violation of the league’s marijuana policy results in fines and suspensions.

Under the MLB drug policy, the league will test players for opioids, fentanyl, cocaine and synthetic tetrahydrocannabinol; those who test positive will be referred to a treatment board.