A Brooklyn police boss who had been using social media to hunt down gangbangers became a target himself when a thug ordered a hit on him using his precinct’s own Facebook page, The Post has learned.

Deputy Inspector Joseph Gulotta, the innovative commanding officer of Brownsville’s 73rd Precinct, was marked for death in an online threat that described his vehicle and the times that he punches in and out of work.

Gulotta filed a police report after reading the chilling post, which has since been taken down.

Police brass are taking the threat seriously, and detectives are hunting for the computer menace.

Cops are worried the poster could be influential enough to make the threat a reality.

“If the guy who made the threat is powerful enough and everybody in the neighborhood holds him in great stature, then somebody might carry out the hit,” a law-enforcement source said.

“He’ll end up in jail for the rest of his life, though.”

Police are investigating whether the poster is a member of OccFam, an offshoot of the Crips street gang, a law-enforcement source said.

“We don’t comment in threat investigations,” NYPD spokesman Paul Browne said.

Sources believe the threat is a reaction to Gulotta’s techniques for using social media to target pistol-packing gang members.

Gulotta is on the vanguard of a new wave of Internet-savvy cops who monitor Facebook and other social-media sites looking for gangsters.

“They have detectives and police officers combing these sites looking for new gang members — who’s up and coming,” a law-enforcement source said.

The gangsters have their own online language — and when they’re not shooting one another in the streets, they’re dissing each other on Facebook.

“On these sites, you’ll find that The Bloods won’t use anything with a ‘C.’ If they use a word with a ‘C’, they slash out the ‘C,’ ” the source said.

“They cross it out. Same thing with the Crips. They won’t use anything with a ‘B.’ Let’s say they use the name Billy, they’ll cross out the ‘B.’

“That’s what knuckleheads these guys are.”

Police officers in Brownsville and East New York, Brooklyn, keep an eye out for gangs in their respective beats.

“In the 75th Precinct, officers monitor social-media sites for the Loopy Gang in the Pink Houses,” the source said.

The 73rd Precinct is among the most dangerous in the city, with 15 murders last year — a high number considering the size of the command.

But there haven’t been any murders this year.

The precinct has also recovered 25 guns so far this year, compared with 11 at this time in 2012 — a 127 percent increase.

Authorities are increasingly using Facebook as a crime-fighting tool.

NYPD cops last fall busted 50 members of rival street gangs after monitoring the thugs’ Facebook posts and telephone calls.

The numbskulls boasted of their murders on the site, authorities said.

And one cop “friended” members of the Brower gang in Crown Heights last spring, monitoring their posts “to track their next moves” and end their burglary wave, Commissioner Ray Kelly said at the time.

The alleged burglars communicated online to plan their capers, police said.

Additional reporting by Rebecca Harshbarger and Dan MacLeod