For the past 16 years, park rangers have done their best to warn visitors about the perils of leaving food in their cars, which a bear can easily peel open for a quick treat. And now a bear management team has begun outfitting bears with sophisticated GPS tracking collars to better understand their movements.

Overall, reported bear encounters have plunged by 92 percent since 1998, when the park embarked on a concerted public education campaign.

Despite their long-term progress, park rangers have lost ground in the battle this year.

The instances of bears raiding campgrounds and parking lots for human food are up by 35 percent from Jan. 1 to Oct. 19 compared with the same period last year— the second such increase during the state’s three consecutive dry years. Officials say the heightened bear activity may be caused in part by the drought cutting the supply of berries and other natural bear food.

Ranger Scott Gediman said the recent increase has put rangers on notice. It reminds them to remain vigilant about telling park visitors to stow their food, toothpaste and sunscreen in a safe place, such as a bear-proof lockbox. By removing easy access to human food, bears are more inclined to keep their distance, Gediman said.

“We do want people to see bears,” he said. “We want people to see them in their natural environment, not breaking into cars.”

Yosemite, which draws 4 million visitors a year to its trails, granite peaks and water falls, is home to about 400 black bears. Throughout California their population is at about 30,000, and they are increasingly wandering into cities such as Bakersfield, Monterey and San Luis Obispo, said Marc Kenyon, a senior environmental scientist with the California Department of Fish and Wildlife.

Kenyon advises residents in such communities to keep food out of reach, because once bears find a source, they will return. “If you can stop that now, you’re going to save yourself a lot of time and heartache in the long run,” he said.

In 1998, the park recorded almost 1,600 bear incidents, a figure that dropped to 120 in 2013. Yet, the number of incidents so far this year surpasses all of last year at 154.

The cost of damaged cars, tents and equipment also fell from about $660,000 in 1998 to $7,500 last year, park records show.

Rangers on occasion still relocate troublesome bears from the park’s developed areas, and they have to kill one or two a year that prove especially intractable, but Gediman said that figure is also down from about 10 a year at the peak.

Within the past two years, two people have died in black bear attacks in Alaska and New Jersey, but California Department of Fish and Wildlife spokesman Andrew Hughan said there are no records in Yosemite or elsewhere in California of such fatal attacks.

The park recently began fitting Yosemite’s bears with modern GPS collars to learn more about their feeding, mating and general activities — and to keep track of them.

— Associated Press