Fifty-miles-per-hour winds ripped through Fort Greene Park as Detective Specialist Anthony Planakis looked up at the tree in front of him. A hive that was home to up to 30,000 bees had been split in half — part of it on the ground, the rest on a branch far above. Infuriated by the pressure change brought on by the departing Hurricane Irene, the bees shot around every which way.

But Planakis had a job to do: save what he could of that hive.

Against his colleagues’ warnings, he jumped in a bucket truck. Using an Alaskan game sock — which he describes as a “big cotton condom” — Planakis covered the hive and the branch, then cut the branch off with a chain saw. The weight nearly sent him flying.

“That bucket was bobbing up and down. [It could] have toppled over,” he recalls of the 2011 incident. “I started twirling my fingers, like, lower me down now. Fast.”

It’s just one of countless dramatic cases “Tony Bees” has experienced over the past 20 years while working in the NYPD.

Born in Astoria and now a Rego Park resident, 52-year-old Planakis is the NYPD’s secret weapon in protecting the city from one of nature’s most notorious beasts: the honey bee. A full-fledged cop, Planakis is technically assigned to the building maintenance section in the budget office. But he’s on call 24/7 for mishaps during bee season (March through September).

It all began in 1971 when, at 9 years old, Planakis spent the summer in Crete with his grandparents. The adults were tracking honey from some hives while suited up. Little Tony wanted to join in the fun.

Planakis removes a hive of about 18,000 bees on 230 East 72nd St., in May.Photo: James Messerschmidt

“Boom, I got [stung],” he says. “I was like, ‘The hell with this. I ain’t doing this s–t.’ ”

But that wasn’t his decision to make. When Planakis and his parents returned to the States, his father decided to get 15 hives. And he expected Tony to help. As much as he would have preferred to play in the park, Planakis began to absorb his father’s respect for the insects.

“When you’re sitting in front of a hive, you’re in a different world,” he says, waxing poetic. “Inside the hive . . . is quite possibly the perfect society. There is no nepotism, no jealousy, no fighting among the individuals. In order for it to survive, everyone has to work in unison.”

Planakis outside of a deli at 45 West 57th St., in June, where 6 to 8 thousand bees swarmed because the Queen bee is here.Photo: Tomas E. Gaston

After serving in the army, Planakis completed his training at the police academy in 1994 and was asked to write down his talents — typically, stuff like electrician experience. Planakis marked down bee whispering. A few months later a swarm appeared in Harlem and, as he says, “the rest is history.”

That first swarm was a doozy: He had to extract the bees from a Russian pine, and the insects had interlaced their legs in the branches. These days, Planakis says most of the jobs blend together. He’s answered 25 calls so far in 2014 — the most notable was a 24,000-strong swarm that was angry about being put under a giant can by some well-meaning citizen in Williamsburg.

Asked what most pisses off bees, he spits out: “Ignorance. You have to respect, respect, respect. They’ve been around for 45 million years. Don’t walk up there thinking that you’re the man, you’re going to take them down.”

Indeed, even the pros get stung. It’s happened six times so far this year for Planakis — not bad, considering that part of assessing a swarm is sticking your hand in the middle of it so they can trust your scent.

The detective takes his work home — he has four hives in his backyard, and collects honey once a year. The going rate is $20 a pound, but Planakis gives his away.

He admits, those bees are to him as puppies are to most people.

“It’s like an extended family, and you gotta treat ’em like that,” he says. “That guarantees their survival into next year.”

Planakis’ profile has risen in recent years, particularly when, in 2012, Police Commissioner Ray Kelly recognized his contributions by handing him the keys to a truck to replace the one he’d been using on his own dime. That bee-mobile, however, is most definitely not black with yellow stripes.

“No, because anybody on the street’s going to go, ‘Oh, that’s him!’ ” he says. “Next thing you know, you’re going to have Commissioner Gordon shooting a big bee thing in the sky.”

Tony Bees by the numbers

20: Years with the NYPD

25: NYPD cases so far this year

36,000 bees: Worst case he’s had this year

Up to 70,000: Number of bees that can live in one hive

450 lbs. in 2013: Amount of honey extracted from his four backyard hives