California regulators on Tuesday banned from stores some types of rat poison that are known to kill wildlife and pets, and have for years have been the target of lawsuits and advocacy efforts by environmental groups.

The state Department of Pesticide Regulation has banned certain pesticide products known as rodenticides -- chemicals to kill rodents -- that contain toxins that have also hurt California wildlife, killing at least 300 animals, including endangered species, in the last two decades.

Rats and mice eat the pesticides, which are placed in and around buildings and homes. But it takes several days for the rodents to die, and they continue to eat the pesticide, which is stored in their body tissue. If pets and wildlife eat the poisoned rodents, they too end up poisoned and can die.

"This is a practical sensible regulation that goes a long way to protecting our wildlife," said Brian Leahy, director of the Department of Pesticide Regulation.

Until now, any consumer has been able to buy rodenticides -- d-Con is a common brand -- from retailers such as The Home Depot and Walmart, and use them in and around their homes. But as of July 1, the products will be removed from most stores, and only certified professionals such as pest control businesses will be able to purchase them.

"The idea is to take it away from the general population, who could misuse it, and keep it in the hands of trained professionals," said Charlotte Fadipe, assistant director of communications for the Department of Pesticide Regulation.

The new regulations were proposed last summer, and were followed by a public comment period. The ban marks a victory for California environmental groups that have been calling for the state to end the use of rodenticides, and have blamed regulators for failing to protect the endangered San Joaquin kit fox, golden eagle, Pacific fisher and other wildlife from the poisons.

Contact Heather Somerville at 510-208-6413. Follow her at Twitter.com/heathersomervil.