New York’s Bravest deserted the city’s Finest on Wednesday — abandoning a Brooklyn firehouse next-door to a police station that’s the target of a threat involving the notorious “Black Guerilla Family” gang.

A fire truck and about 25 firefighters assigned to Engine Co. 222 moved out of its headquarters adjacent to the NYPD’s 81st Precinct building in Bedford-Stuyvesant, the FDNY confirmed.

“There are no threats against the fire department,” FDNY spokesman Jim Long said. “It’s just that that precinct and fire house are adjacent to each other. We’re just doing this out of an abundance of caution.

“We’ve relocated the engine to a neighboring fire house. We’re giving the police department the chance to mitigate the issue,” he added.

Long noted that the decision was made solely by the FDNY, and wasn’t based on a recommendation from the NYPD.

Two ESU cops wearing helmets and body armor — and armed with assault rifles — stood guard Wednesday outside the 81st Precinct, where the entrance was surrounded by metal barricades.

Security was beefed up at both the 81st and 79th precincts Tuesday night after a confidential informant told cops about overhearing that the Baltimore-based Black Guerilla Family was plotting to “shoot it out” with cops there.

The NYPD was already on high alert following Saturday’s execution-style killings of two cops by a gunman who wrote online about exacting revenge over recent police killings of unarmed black men in Staten Island and Ferguson, Mo.

Meanwhile, law-enforcement sources said protesters displayed photos of slain cops Rafael Ramos and Wenjian Liu while chanting slogans comparing the NYPD to the KKK on Tuesday night.

The sickening demonstration came despite a plea by Mayor de Blasio that the anti-cop protests be suspended until after the funerals of Ramos and Liu.

About 80 cops were turned into potential sitting ducks when they were assigned to keep protesters off the Triborough Bridge, the head of the detectives’ union said.

The cops, mostly detectives in uniform, were initially ordered to use plastic orange netting to corral and arrest anyone who tried to block traffic on the bridge, Detectives Endowment Association President Michael Palladino said.

But when the marchers were just blocks away, a lieutenant ordered the cops to not make any arrests — but remain in place while holding the netting, Palladino said.

“Surrendering the streets, bridges and thoroughfares is dangerous for civilians and cops,” Palladino fumed.

“If we are not going to set some ground rules and enforce the law, then our cops should not be placed in harm’s way.”

He also called the ongoing situation “an invitation for every screwball in the country to come to New York City to demonstrate for their respective causes.”

The NYPD declined to comment.