FEATHER IN HIS CAP: Fowl-whisperer Bobby Horvath grabs hold of a Queens school’s runaway peacock named Kevin, with the assistance of two animal-control officers. Photo: Riyad Hasan

At least somebody in this town knows how to catch a peacock!

After weeks of failure by cops, animal-control officers and the bird’s own handlers, a Long Island avian expert finally nabbed a runaway peacock yesterday that humiliated authorities for two weeks.

Officials had gotten so desperate in their hunt for the freewheeling fowl that they called on Bobby Horvath when the wayward bird was spotted at 8 a.m. behind an apartment on 68th Drive in Kew Gardens.

The animal wrangler — who says he deals with at least “two or three” peacock escapes a year — immediately decided to ditch the failed tactic of sneaking up on the bird and planned a full-on assault.

“The way I got him, the bird started pecking at something on the ground. When I saw he was looking down . . . I charged,” he said. “That is the only way to catch that bird.”

Horvath and two animal-control workers ran at the peacock from three sides.

“The three of us charged at him,” he said. “He flew straight up like a helicopter, and I was lucky enough to be in the middle. I caught him six feet in the air midflight with a big fishing-type net.”

After being netted, the bird came quietly.

“I carried him under my arm like a football,” said Horvath. “The whole process took like 10 seconds.”

The bird is now back at John Bowne HS in Kew Gardens, from where he had escaped.

Students have dubbed him Kevin, after a plucky bird character in the film “Up,” though teachers call him Beelzebub.

He has now had his wings clipped to prevent further escape.

“I’m really excited that he’s back to welcome the kids back from summer vacation,” said the school assistant principal Steve Perry, who is also the head of the agricultural program.

The bird escaped in mid-August and was first spotted on the loose on Aug. 14.

On Aug. 21 cops started trying to nab the peacock. But it proved more slippery than Houdini, as attempt after attempt — including netting, darting and swiping at it with a net — failed.

At one point Phil Dickler, a biology teacher at John Bowne, went out to catch the bird himself. But the peacock simply flapped its wings and flew away — seeming to “laugh” at Dickler.

Finally, yesterday, animal-control officer Mike Pastore responded to the 8 a.m. sighting and called in Horvath, who’s with Wildlife in Need of Rescue and Rehab.

“Mike Pastore contacted me . . . and told me that the bird was in a good position to be captured,” Horvath said. “He was in the rear of an apartment building and it had a small back yard with a six-foot chain-link fence.

“We used that fence to our advantage so he couldn’t run.”

Perry is now happy the bird is back home where itbelongs, alongside its peacock son. But the principal acknowledges that the capture may disappoint some people in Queens.

“I know the neighborhood is bummed. People really liked spotting him in Kew Gardens,” he said.

Trying to trap a peacock

* Aug. 21: In a backyard in Flushing, Queens, cops try to throw a tarp over it. Later, nearby, they try to trap it in a garbage can.

* Aug. 22: On Jewel Avenue, an NYPD Emergency Service Unit officer tries to hit it with a tranquilizer dart, but misses. The animal lingers on a roof “laughing at us,” one would-be captor said.

* Aug. 23: It’s spotted strutting on a garage roof on 69th Road, but animalcontrol workers with a net fail to catch him.

* Yesterday: In a Kew Gardens yard, peacock wrangler Bobby Horvath and two accomplices grab it with a net.