Only hours after two New York City police officers were executed in their patrol car on Saturday, the president of the largest police union rushed to the microphones to blame the killings on Mayor Bill de Blasio and those who demonstrated against excessive force by the police.

“There is blood on many hands, from those that incited violence under the guise of protest to try to tear down what police officers do every day,” said Patrick Lynch, president of the Patrolmen’s Benevolent Association. “That blood on the hands starts at the steps of City Hall, in the office of the mayor.”

For many New Yorkers, this was a grotesque overreaction to the horrifying act of a single mentally ill gunman, an exploitation of a double murder to make a political point in a feud with the mayor. But it did not come as a shock to anyone familiar with the P.B.A.’s long history of bullying any critic of the police. Whether the issue is the department’s relationship with minorities, its endless fight against internal corruption, or its excessive demands in contract negotiations, the police unions have attacked and often slandered every recent mayor, even those who prided themselves on being crime fighters.

In June of 1966, when complaints of increasing police brutality against minorities prompted Mayor John Lindsay to propose a civilian review board, an unauthorized voice came over the police radio: “Everybody to City Hall!” More than 5,000 off-duty cops mustered outside the building, the largest police gathering up to that time, to protest the possibility of outside scrutiny into the way officers conducted business.

“I am sick and tired of giving in to minority groups, with their whims and their gripes and shouting,” said John Cassese, then president of the P.B.A. “Any review board with civilians on it is detrimental to the operations of the police department.”

The police unions conducted a huge public relations campaign that defeated the review board in a referendum that year. As always they resorted to their most effective cudgel, public fear of crime, and the explicit suggestion that urban violence could increase if police officers were not given their way. In advertisements, the unions told voters that killing the review board was so important that “your life may depend on it.”

The board was revived 20 years later by Mayor Ed Koch, who generally had a friendly relationship with the police unions. But that warmth didn’t stop the unions from staging a work slowdown in 1985 after a white officer, Stephen Sullivan, was indicted for manslaughter after shooting to death Eleanor Bumpurs, an elderly and mentally ill black woman. The unions pressured the Koch administration into restoring Sullivan to the force even while he was under indictment. (He was later acquitted.)

The lowest moment for the police unions occurred in 1992, when the P.B.A. organized another City Hall rally to protest the strengthening of the review board by Mayor David Dinkins. This time the crowd surged to 10,000 officers, with union members hurtling barricades, jumping on cars, blocking the Brooklyn Bridge, and kicking reporters. Some members carried signs showing Dinkins with a bushy Afro haircut and swollen lips, with slogans that ridiculed him as a “washroom attendant.”

Rudolph Giuliani, who would run for mayor the next year on a crime-fighting platform, was present throughout the rally and led the crowd in denouncing Dinkins. But though he eventually became the mayor most closely identified with a stronger police force, he lost the union’s favor within a few years by refusing to agree to demands for a police contract far more generous than the ones reached with other municipal unions. By 1997, union members distributed a flier demanding that Giuliani be excluded from their funerals because his attendance “would only bring disgrace to my memory.” That’s almost exactly the same language now being used by P.B.A. members against de Blasio, who is also threatened with exclusion from their funerals.

In pursuit of higher raises, the P.B.A. also held noisy protests outside the townhouse of Mayor Michael Bloomberg, and threatened to go on strike during the 2004 Republican National Convention at Madison Square Garden.

Critics of public-sector unions say they all use their implicit power to shut down vital services in order to win their demands. But the police unions are in a different category. While a subway or a garbage strike can create intense inconvenience, the threat of a slowdown by the police — or the sight of 10,000 out-of-control officers shouting racist slogans — creates a much more deep-seated fear. The members of no other union carry guns in public, or are responsible for public safety. Police unions carry a special burden to act in the highest interest of the city, but over many decades, no other union has acted less responsibly.