Maryland has become the second U.S. state to pass a law banning the routine use of antibiotics in healthy livestock and poultry, a move aimed at battling the rise of dangerous antibiotic-resistant bacteria known as “superbugs.”

Maryland’s Keep Antibiotics Effective Act, which aims to end a practice that public health experts say can fuel the spread of superbugs, takes effect on Oct. 1 after Governor Larry Hogan declined to sign or veto it last week. Farmers in Maryland have until Jan. 1, 2018, to comply with the law.

Roughly 70 percent of antibiotics important for human medicine are sold in the United States for use in meat and dairy production. Medical researchers say overuse of such drugs diminishes their effectiveness in fighting disease in humans by contributing to antibiotic resistance.

The World Health Organization has warned that human infections from antibiotic-resistant bacteria pose a grave threat to global health. Such infections are estimated to kill at least 23,000 Americans annually, although a recent Reuters investigation found that many infection-related deaths are uncounted.

California in 2015 adopted tough rules for antibiotic use on farms. Its law, which takes effect on Jan. 1, also restricts the regular use of antibiotics for disease prevention and bans antibiotic use to fatten up animals.

The laws in Maryland and California go further than the U.S. Food and Drug Administration’s guidelines, which seek to prohibit the use of antibiotics for growth promotion in farm animals but do not address the routine use of antibiotics for disease prevention.