NEW YORK — The assassination of NYPD Officer Miosotis Familia, shot in the head through the window of her mobile command unit in the Bronx, was just the latest example of deadly force being used against a New York City officer by a violent individual with a history of hating cops.

A similar incident happened on Dec. 20, 2014, five days before Christmas, when Ismaaiyl Brinsley took a bus from Baltimore and fired four shots from his semi-automatic weapon into a patrol car in Bedford-Stuyvesant, Brooklyn.

He hit NYPD detectives Rafael Ramos and Wenjian Liu in their heads and upper bodies, killing them instantly.

Brinsley was enraged about two different grand juries refusing to indict police officers involved in the deaths of black men. Weeks before Ramos and Liu were assassinated, a Staten Island grand jury declined to indict NYPD Officer Daniel Pantaleo in the chokehold-style death of Eric Garner, who was selling loose cigarettes outside a bodega when the the deadly encounter with police occurred.

Brinsley was angry about that and also took part in national protests about the shooting death of Michael Brown in Ferguson, Missouri, where a grand jury refused to indict the police officer in that case.

Brinsley posted on social media before the assassinations of Ramos and Liu that he intended to “put wings on pigs.”

After he shot Ramos and Liu, Brinsley killed himself in a nearby subway station. Ramos and Liu, officers when they died, were posthumously promoted to detectives first grade.

Less than six months after Ramos and Liu were assassinated, Officer Brian Moore, also a plainclothes anti-crime cop like Officer Miosotis Familia, noticed a man in Queens Village moving something on his waistband that looked like a gun and told him to stop.

The suspect, Demetrius Blackwell, shot into Moore’s car and hit the 25-year-old officer in the face.

Moore died two days later. He, too, was posthumously promoted to detective first grade.

Later the same year, on Oct. 20, 2015, Officer Randolph Holder was fatally shot in the head in East Harlem while chasing a drug suspect near FDR Drive. Holder was also posthumously promoted to detective first grade.

More than a year passed before NYPD Sgt. Paul Tuozzolo was killed, after police chased a domestic violence suspect in the Bronx.

As Tuozzolo approached the vehicle driven by Manuel Rosales, the suspect fatally shot Tuozzolo in the head. Rosales was later killed in a hail of police gunfire.

Nearly 30 years ago, during the height of the crack cocaine epidemic, Officer Edward Byrne was a 22-year-old rookie cop in Queens’ 103rd Precinct with just six months on the job.

He was sitting alone in his patrol car outside the home of a drug witness in South Jamaica, when four men crept up on his vehicle. One of them, Todd Scott, distracted him from the passenger side window. Another, David McClary, shot Byrne multiple times through the driver’s window, killing him instantly.

Four suspects were caught a week later and several confessed they were acting on the orders of jailed drug enforcer Howard “Pappy” Mason. Mason was angry that he had been thrown back in jail and offered $8,000 to his minions if they would kill a cop.

As getaway driver, Scott Cobb described the motive behind the shooting: “They take one of us, we take one of them.”

Nationally, 2016 was a deadly year for police officers, and some of those slain cops were assassinated.

The most prominent case happened in Dallas, Texas.

On July 7, 2016, Micah Xavier Johnson, an Army reservist who served in the Afghan War, ambushed a group of Dallas police officers, killing five of them and wounding nine others. Johnson said he was angry over police shootings of black men and started firing after a nighttime protest in Dallas.

The demonstrators were protesting the recent police killings of Alton Sterling in Baton Rouge, Louisiana, and Philando Castile in Minnesota. Dallas emergency response teams followed Micah Johnson into a nearby building and killed him with a remote-controlled bomb attached to a robot.

And now in 2017, we have the tragic case of Officer Miosotis Familia, a 48-year-old mother of three working a special overnight detail for the 46th Precinct, assigned to a location that was rife with gang gun violence.

Her assassin Alexander Bonds was on parole after doing seven years in prison for a robbery in Syracuse. He allegedly assaulted police in the past and had an extensive criminal record.

Surveillance footage showed Bonds walking “with purpose” toward Familia’s vehicle, before shooting through the window. Police chased Bonds and killed him.

The murders of female police officers have been rare, but they’ve happened before. Officer Moira Smith led multiple people to safety during the 9/11 terror attacks but was killed in the collapse of the Twin Towers.

More than three decades ago, Transit Police Officer Irma Lozada was chasing a subway robbery suspect on the L line when she became separated from her partner in Brooklyn. Three hours later, Lozada’s body was found in a parking lot.

The suspect had fatally shot Lozada in the head, with her own police weapon, when she tried to arrest him.