NEW YORK — In the long, bitter and testosterone-rich rivalry between the New York Police Department and the FBI, few things aggravated the G-men more than the repeated towing of their cars by the local cops. And the practice was one of the first things that NYPD Commissioner William Bratton banned when he took over in late 2013 and tried to defuse tensions with his most important counterterrorism partner.
Relations between the NYPD and the FBI, never warm, deteriorated sharply after the Sept. 11, 2001, attacks when the country’s largest police force transformed its own intelligence division and expanded its counterterrorism work well beyond the city limits, brushing up against the bureau’s prerogatives.
But Bratton, who has hired some prominent FBI personnel into the NYPD, has purged much of the bad blood, drawing praise for ending turf wars that potentially endangered the city.
‘‘If there is a glitch in this one . . . that’s going to be a big deal,’’ said John Miller, the NYPD deputy commissioner of intelligence and counterterrorism who also spent years working for the FBI.
‘‘It’s a no-brainer to work together,’’ said Diego G. Rodriguez, a Queens native who’s in charge of the FBI New York Field Office, adding, ‘‘I don’t know how to do business any other way. I am from here.’’
Under the previous police commissioner and his chief of the intelligence division, the NYPD saw the FBI as more rival than partner. The NYPD tried to limit the FBI’s visibility into its intelligence operations, raising concerns among federal agents that some investigations weren’t being done properly.
But with the arrival of Bratton, FBI officials now have a seat at the NYPD’s weekly intelligence collection meeting. The FBI and NYPD have also swapped intelligence analysts as part of a three-month-old pilot program; previous exchanges involved investigators.
Miller said the relationship benefits from his time working at the FBI.
‘‘It helps to speaks fluent FBI,’’ he said.
The NYPD also hired Peter Donald, a former FBI spokesman in New York, as director of communication, a key role in handling crises and reducing friction.
More importantly, the two sides are working together, officials said. Last summer as the number of terrorism suspects linked to the Islamic State spiked, the Joint Terrorism Task Force struggled to keep pace and found itself with more suspects than surveillance teams. Miller then shifted some of his teams doing lower-priority cases to help out.
‘‘We benefit from John,’’ said Carlos Fernandez, one of the FBI’s most experienced counterterrorism agents, who overseas the Joint Terrorism Task Force, the largest in the country.
The FBI also benefits from the NYPD. The Police Department has more than 100 officers on the Joint Terrorism Task Force, working among the 17 counterterrorism squads. About 25 percent of the officers on the task force are from the NYPD.
Also helping to soothe relations are changes in the way the NYPD Intelligence Division conducts its operations, a flash point in previous years. After Muslims in New York successfully sued the Police Department, saying their constitutional rights were being violated by police surveillance practices, the NYPD, in response, updated its investigative guidelines, bringing them closer in line with the FBI’s.
Still, some of the old tensions can resurface. When a Muslim convert attacked four NYPD officers with a hatchet in 2014, Bratton called the incident a ‘‘terrorism act.’’ Police officials pointed to the suspect’s extensive online history, but the FBI was more skeptical because his last overt contact in the days preceding the attack was with a black extremist not connected to a terrorism group.
Police officials were irritated that the FBI didn’t immediately back its assessment, a former bureau official said. FBI Director James B. Comey later said, ‘‘There is no doubt it was terrorism.’’
‘‘We had that conversation and moved on,’’ Miller said. ‘‘We made our point.’’
Miller added that disagreements are inevitable, but they don’t spill into the tabloids as they used to, with each side sniping at the other.
‘‘It’s a collective result of all this lowering of testosterone,’’ Miller said.
Perhaps the best evidence that the FBI has buried its grievances was the promotion in June 2014 of Paul Ciorra to become chief of operations of the Intelligence Division. Ciorra was at the center of one of the worst moments in NYPD-FBI history when police officers, without informing the bureau, approached an imam about a terrorism suspect involved in a plot to attack the subway system. The imam tipped off the suspect and enraged FBI agents who feared the investigation had been compromised. While not at fault, Ciorra was blamed and sent to the highway division.
When Miller was considering candidates for the job in the intelligence division, he called the FBI to see if Ciorra was still radioactive and was told that it was all in the past.