The Maryland General Assembly has passed new legislation that requires research facilities in the state to “take reasonable steps” to adopt out any dogs used in scientific experiments once they are no longer needed.

Named the Beagle Freedom Bill because beagles are the most commonly used dog breed for research, the new law means institutions will have to search for placement of the dogs, or create relationships with animal rescue centers that can help find them new homes.

Up until now, there have been no laws regulating what happens to animals after the testing ends, and animals are routinely euthanized once they are no longer considered useful.

The Rescue Freedom Project (RFP) is an organization dedicated to getting this legislation passed throughout more states in America.

“Voluntary programs like post-research adoption are tenuous at best as policy often changes with personnel,” said Shannon Keith, president of RFP. “The Beagle Freedom Bill will ensure that all dogs and cats that are deemed healthy candidates for adoption always get that chance going forward.”

Five other states have already passed the bill, including Minnesota, California, Nevada, Connecticut and New York.

Although the number of dogs and cats used for research is dropping, the U.S. Food and Drug Administration requires that any new drug must be be tested on animals before it is trialled for humans.

In spite of this requirement, drug testing on animals is inefficient and often impractical. Drugs shown to be safe when tested on animals often still prove toxic or ineffective when used in humans. Many researchers are trying to come up with better testing methods using computer or cell models, so more accurate data can be produced without the cruelty involved in animal testing.

The Baltimore Sun reports that 49 dogs were used for research at Johns Hopkins Medicine in Maryland alone last year. In 2016, a total of 821,000 animals were used for research in the U.S, including 61,000 dogs.