The day before I hiked up Mount Garfield with my son-in-law, I went to a sports shop and bought a sizable can of bear Mace, complete with a holster, which retailed for $42.95. My family laughed at me and said I could have spent the money more profitably on scratch-off lottery tickets or hair care products.

For years, I’ve hiked in the White Mountains and never had a run-in with an ornery black bear, although they’ve crossed my path from time to time, but we always went our separate ways without so much as an angry word or growl. Once, a bear grunted at me on the trail, and I wasn’t sure whether he was trying to say, “Hey, you! Get off of my cloud!” or “Have a nice day!” or “Got any treats in that backpack you can share?”

Like most hikers, I never thought much about the bruin population until I started reading stories that said bears are getting increasingly roguish and going after bird feeders, garbage cans and people. You see, a basic principle of peaceful coexistence with wildlife is never to hang out near dumpsters because things could get ugly. And never, ever get between a bear and his meal, or you could become the appetizer.

One of the closest encounters I had with a bear was the Sunday morning I went out the back door (in New Hampshire) to pick blueberries from bushes behind the house and suddenly found myself staring face-to-face with a bear that was having his breakfast.

I should have reached for my pellet gun or police whistle, but instead, fool that I am, I reached for my camera and went to take his picture. I got a great shot, but looking back, it would have been wiser to photograph him from the window — although I’ve heard that bears around Lake Tahoe are so smart they know how to open doors and windows and probably can even swipe ATM cards and make off with your retirement savings to buy honey at Whole Foods.

I later learned there are a lot of equally dumb people in the world who take selfies with bears — and some have lived to tell the tale. A story I read had the headline “Bear Selfies Force Colorado Park to Close.” It seems a growing number of nitwits with selfie sticks are moving to within 10 feet of bears at the Waterton Canyon recreation area outside of Denver. As you know, they have grizzlies out there that aren’t particularly friendly.

On the other hand, what do you expect in a state where marijuana is legal? I suspect even the bears get mellow and want to have their photos taken for a few bucks … just like those cartoon characters in Times Square who are always bugging tourists.

A week before my hike, I ran into a guy I know on the train platform, which is where I get advice about investments, good restaurants and the married life. Even though this fellow works on Wall Street, he’s a real outdoorsman in the tradition of Grizzly Adams, Davy Crockett and David Letterman, and he told me an absolutely hair-raising story — and I don’t have any hair to raise — about a run-in he had in the Adirondacks.

One late afternoon, while he was wandering through the woods, he spotted a large black bear 70 feet away, so he raised his hand to signal his presence, but the bear didn’t wave back. Instead, he started to charge and got within 30 feet when the guy shouldered his 270 Winchester and dropped him. My attitude changed after that story, I bought whistles, fog horns and bear Mace for my backpack.

This led to a lot of jokes at my expense. “Haha, what are you going to do with that?” my daughter asked. “Squirt Smoky the Bear and arrest him for lighting matches?”

I took the jesting in stride and secretly vowed that if the bear started chasing us down the mountain, my son-in-law was on his own. Fortunately, the 11-mile hike went off with no problems and the only injury was to my aging knees.

A few nights later, my son-in-law and daughter were watching a Canadian movie titled “Backcountry” based on a “true story” about a large, surly black bear that stalks a honeymooning couple and eventually makes his move and eats the groom alive. They were scared out of their wits. To them, I was no longer a fool for buying bear Mace. I was a visionary. So let this be a lesson to us all: Never go anywhere, especially on your honeymoon, without a large can of bear Mace.