A man lights and leaves a candle at the entrance to the 46th Precinct in the Bronx borough of New York, Wednesday, July 5, 2017. A police officer from the 46th Precinct was shot to death early Wednesday, ambushed inside her command post RV by an ex-convict who once ranted online about his treatment in prison and about police getting away with killing people, authorities said. He was later killed after pulling a gun on police. less

A man lights and leaves a candle at the entrance to the 46th Precinct in the Bronx borough of New York, Wednesday, July 5, 2017. A police officer from the 46th Precinct was shot to death early Wednesday, ... more

Photo: AP Photo/Seth Wenig

Image 2 of 3

Emergency personnel stand near the scene where a police officer was fatally shot while sitting in a marked vehicle in the Bronx section of New York, Wednesday, July 5, 2017. Police said Officer Miosotis Familia died at a hospital early Wednesday. less

Emergency personnel stand near the scene where a police officer was fatally shot while sitting in a marked vehicle in the Bronx section of New York, Wednesday, July 5, 2017. Police said Officer Miosotis Familia ... more

Photo: AP Photo/Seth Wenig

Image 3 of 3

New York City officer shot to death in ambush; gunman killed

1 / 3

Back to Gallery

NEW YORK >> A police officer was shot to death early Wednesday, ambushed inside her command post RV by an ex-convict who once ranted online about his treatment in prison and about police getting away with killing people, authorities said. He was later killed after pulling a gun on police.

The officer, a 12-year member of the New York Police Department, was wrapping up her shift when the man fired one round through the passenger-side window and struck her in the head.

“PO Miosotis Familia has been assassinated in an unprovoked attack on cops assigned to keep NYers safe,” Police Commissioner James O’Neill tweeted after her death.

Police say a New York City officer who was shot while sitting in her patrol car has died in what they’re calling a “clear assassination.” Police Sgt. Brendan Ryan says 48-year-old Officer Miosotis Familia died at a hospital early Wednesday.

Officers responded quickly and caught up to 34-year-old Alexander Bonds about a block away, police said. As they confronted him, he pulled a revolver, and police fired, killing him. A silver revolver was found at the scene. A bystander was hit in the stomach by a bullet and is in stable condition, police said.

Familia, 48, had been stationed in a mobile command post, an RV-sized truck used as a communications hub during major events and in high-crime areas as a constant police presence. She had been writing in her memo book, a police log where officers record their shift activity, when Bonds walked up.

Bonds, who also went by the name John Bonds, was sentenced to six years in prison on an armed robbery case in Syracuse and had been released on parole in 2013. His supervision was set to end next May.

Bonds was captured on video exiting a nearby convenience store, then moving tightly along the wall, pulling his hoodie over his head and walking purposefully toward the van. The video doesn’t capture the shooting but shows him running from the scene with a gun in his hand, police said.

In a video posted on Facebook in September, the Bronx man ranted about the treatment of civilians by officers and talked about how hard life was behind bars. The photos of Bonds posted on the page match a police mugshot.

“Don’t think every brother, cousin, uncle you got that get killed in jail is because of a Blood or Crip or Latin King killing them. Nah, police be killing them and saying that an inmate killed them,” he said in the video.

The shooting recalled the Dec. 20, 2014, killing of patrol officers Wenjian Liu and Rafael Ramos, who were ambushed and shot to death in their vehicle by a man who approached the passenger window of their marked police car. The suspect, 28-year-old Ismaaiyl Brinsley, then fatally shot himself. Brinsley announced online in the moments before the shooting that he was planning to shoot two “pigs” in retaliation for the police chokehold death of Eric Garner.

Last month, a man pleaded guilty to killing two police officers in patrol cars in Iowa and said he simply disliked law enforcement.

Mayor Bill de Blasio, speaking at the hospital before Familia died, asked that the city keep her in their thoughts.

“She was on duty serving this city, protecting people, doing what she believed in and doing the job she loved,” he said. “And after this shocking and sudden attack, her fellow officers came to her aid immediately.”

Officers saluted at attention outside the Bronx hospital as the ambulance and police motorcade escorted Familia’s body from the hospital. Familia had three children and had been a member of the anti-crime unit.

“Fully knowing the dangers that she faced, she suited up in uniform every day and stood tall against those who threaten and terrorize the good folks of the Bronx,” said Patrolman’s Benevolent Association president Patrick Lynch.

The Bronx neighborhood was blocked off with police tape as anguished officers investigated the deadly shooting. Police were combing for other surveillance footage and talking to witnesses. The truck’s door was opened and the bullet hole was visible through the cracked glass.

Witness Jay Marzelli told the Daily News of New York he thought the shots were fireworks at first.

“I was in this bodega right here on Creston, just getting a sandwich and all of a sudden there was all this running and stuff going on, and I look out, probably 40, 50, 60 cops screaming, ‘Call a paramedic, clear the block!’” he said. “It looked like there was a riot going on, and two seconds later I hear gunshots, ‘Bam, bam,’.”