YELLOWSTONE NATIONAL PARK, Wyo. — When the Yellowstone grizzly bear was listed as threatened under the Endangered Species Act in 1975, there were only about 100 to 200 of them in the park and the surrounding country.

The main culprit in their decline was, oddly, garbage. Bears raiding Dumpsters in a campground or, say, lapping up bacon grease behind an outfitter’s tent were often shot as scary nuisances.

A 35-year campaign to clean up dumps and bear-proof garbage cans — and to teach people to keep picnic baskets and coolers in the car — has had a significant payoff. There were 717 grizzlies at last count in the 20 million acres in and around Yellowstone National Park.

Still, the bears have all but disappeared from almost all of the continental United States, except for Yellowstone and Glacier National Parks and a few other slivers of habitat. All told, there are about 1,800 in the lower 48 states. One reason for the overall decline is that they have the lowest reproductive rate of any mammal in North America, besides humans.