Run or fight? That is the question prompted by a series of recent animal attacks, including an alligator that dragged a 2-year-old to his death in an Orlando lake last month. And CNN reported recently that a mountain lion in Colorado had attacked a 5-year-old boy, who was saved when his mother pried the child away.

While both of those incidents were rare, travelers should keep a safe distance from animals they encounter in national parks and preserves, experts say.

“You’re safer in a national park than you are in any city if you use respect and allow the animal a comfort zone,” said Jack Hanna, the director emeritus of the Columbus Zoo and Aquarium who has hosted several television series devoted to wildlife.

Safe distances depend on the animal. A rattlesnake, he said, can spring a body-length or more from its coil, and should be given at least a six-foot berth. Give an alligator 50 to 60 feet and a bear not less than 30 yards and up to 50 if it has cubs.

Below are species-specific responses to North American Wildlife.

Alligators

Alligators are found from North Carolina to Texas but are especially prevalent throughout Florida where, according to the Florida Fish and Wildlife Conservation Commission, they number 1.3 million.

“They prefer freshwater lakes and slow-moving rivers and their associated wetlands, but they also can be found in brackish water habitats,” wrote Tammy Sapp, spokeswoman for the commission, in an email.

The agency reports that alligator incidents are rare. From 1948 through April 2016, 383 people were bitten. Of those, 23 died.

It advises not swimming between dusk and dawn, when the animals are more active. If an alligator does attack, kick or poke it in the eyes. The commission recommends getting immediate medical attention, as alligator bites can result in severe infection.

Bears

Bears are usually a threat only when surprised or when protecting their cubs. Rangers at Yellowstone National Park recommend hiking with bear spray, a pepper spray that inhibits a bear’s ability to see, smell or breathe.

Avoid hiking at dawn, dusk or night, and make noise, such as yelling out “Hey, bear!” especially when approaching blind corners or heading through brush. Visitors are encouraged to hike in groups of three or more. Ninety-one percent of people injured by bears in Yellowstone since 1970 were hiking alone or with one companion.

If you do encounter a bear at a distance, slowly back away, drawing your spray. If you surprise one, do not run, as it may trigger a chase response. If the bear charges, stand your ground and spray it when it is 30 to 60 feet away. Only when it makes contact should you play dead to show that you are not a threat.

Fighting back only makes it worse. According to park statistics dating to 1970, those who fought back sustained very severe injuries 80 percent of the time. Those who remained passive received only minor injuries 75 percent of the time.

The advice holds for black and brown bears.

Hanna survived his own encounter with a mother grizzly and two cubs on a trail in Montana six years ago. By backing away, he and a group of hikers escaped two bears. One cub charged, forcing Hanna to use his spray, after which the animal fled. “If you run,” he said. “you won’t make it.”

Mountain Lions

According to the Mountain Lion Foundation, mountain lions are generally found in 14 Western states. The foundation believes there are fewer than 30,000 in the country.

“I’ve seen one three times in 40 years of being in the mountains,” said Hanna, who has a home in Montana. He said attacks are extremely rare.

Avoid hiking alone, or take bear or pepper spray. If you are attacked, according to the foundation, do not run, but stand tall and open your coat or raise your arms to look big. Maintain eye contact, slowly wave your arms, speak firmly and throw items if necessary. Normally, the cat will move on.

Sharks

Shark attacks are on the rise, according to the International Shark Attack File at the University of Florida, which tracks incidents worldwide. There were 98 attacks in 2015, surpassing the previous record of 88 set in 2000. Of those, the largest share, 59, took place in the United States.

To prevent an attack, the research center recommends not swimming at dawn, dusk or night; not swimming where people are fishing, where fish are schooling or where seabirds are feeding; and not wearing shiny jewelry in the water.

If you are attacked by a shark, pound it on the nose and scratch at its eyes and gills.