What to Know A female NYPD officer died after she was shot in the head while she sat in a marked command vehicle in the Bronx, officials say

A sergeant and another police officer encountered the suspect nearby who pointed a gun at them who then shot and killed the suspect

Police are calling the shooting on the officer an "unprovoked attack"

A police officer was shot and killed while sitting in a marked NYPD command vehicle with her partner in the Bronx Wednesday morning in what officials called "an unprovoked attack on cops."

NYPD Officer Miosotis Familia, 48, was stationed in a mobile command post -- a RV-sized truck used as a communications hub during major events like the Fourth of July -- in the area of 183rd Street and Morris Avenue in Fordham, according to Police Commissioner James O'Neill.

She was wrapping up her shift just after midnight and had been looking down, writing in her memo book -- a police log where officers record their shift activity -- when a gunman walked up and fired through the passenger side window, O'Neill said.

The gunman, identified by police as 34-year-old Alexander Bonds of the Bronx, is seen in surveillance footage leaving a convenience store, then moving tightly along the wall, pulling his hoodie over his head and walking purposefully toward the van, according to officials. The video doesn't capture the shooting but shows him running from the scene with a gun in his hand, police said.

The bullet struck Familia in the head. Her partner immediately radioed in for assistance.

"Shots fired! 10-85!" the officer is heard shouting after the gunfire, including the code for an officer down. "My partner's shot! My partner's shot! My partner's shot! Hurry up, central!"

An anti-crime team consisting of a sergeant and a police officer who were in uniform encountered the suspect running about one block away from the scene of the shooting, O'Neill said.

They confronted the suspect, who took out a gun and pointed it at them. The officers then fired at him and killed him, O'Neill said. A silver revolver was recovered at the scene.

#NYPD PO Miosotis Familia has been assassinated in an unprovoked attack on cops assigned to keep NYers safe. Keep her family in your prayers pic.twitter.com/yhRB7H5bvi — Commissioner O'Neill (@NYPDONeill) July 5, 2017

Another person, believed to be a bystander, was also struck by a bullet in the stomach, police said. The man is in stable condition.

Familia was taken to St. Barnabas Hospital in extremely critical condition and later died, authorities said. She was a 12-year veteran of the NYPD and a member of the 46th Precinct. Familia had three children, including a set of twins, and spent her entire NYPD career in the Bronx precinct, where she worked the midnight shift.

O'Neill said, "Based off what we know right now, it's clear this was an unprovoked attack on a police officer who are assigned to keep the people of this great city safe."

"Based off what we know right now, it's clear this was an unprovoked attack on a police officer who are assigned to keep the people of this great city safe," O'Neill said.

There was a sea of blue outside of St. Barnabas Hospital, and officers lined up near the ambulance entrance to salute their fallen co-worker as her body left the hospital.

The command post where Familia had been working had been set up since March following a triple shooting, and was manned around the clock. Shock surrounded the neighborhood after just celebrating the Fourth of July. Numerous streets remain closed around the crime scene.

Mayor Bill de Blasio said Familia was "serving this city protecting people, doing what she believed in and the job she loved."

Gov. Andrew Cuomo said all New Yorkers share in the pain and heartbreak caused by her death. He ordered the flags to fly at half-staff beginning Thursday and until Familia's interment.

Bonds, who went by two names -- Alexander and John -- had been on parole for a robbery case in Syracuse. He was sentenced in 2006 to six years and 10 months to eight years in the case, and was released on parole in May 2013, with a supervision completion date set for May 2018.

A law enforcement official said the gun Bonds used in the shooting was stolen from West Virginia.

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 without warning 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.

Witness Jay Marzelli told the Daily News he thought the shots Wednesday 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,' and then the police officer was just laying there."

PBA President Patrick J. Lynch said in a statement that Familia "gave her life protecting a neighborhood that had been plagued by gang gun violence. Fully knowing the dangers that she faced, she suited up in a uniform every day and stood tall against those who threaten and terrorize the good folks of the Bronx."

"We will keep her in our hearts and minds as we do all of the women and men who have made the ultimate sacrifice for the city they loved," he said.