NEW YORK — The New York Police Department is investigating after a police officer was shot and killed in an unprovoked attack in the Bronx on Independence Day, according to our New York affiliate Pix11.

Miosotis Familia, 48, was sitting in a marked vehicle near Morris Avenue and East 183rd Street in the Bronx around 12:30 a.m. when she was shot in the head, police said. She was initially transported to a hospital in critical condition, and pronounced dead within hours.

"Based on what we know now, it is clear that this was an unprovoked direct attack on police officers who were assigned to keep the people of this city safe," NYPD Police Commissioner James P. O'Neill said.

He described her killing as an assassination.

Accused killer Alexander Bonds, 34, was shot and killed by a sergeant and a police officer who found him running about a block away from the crime scene, police said. Bonds allegedly pulled out a revolver and the officers opened fire.

A bystander was struck by a bullet during the confrontation and was hospitalized, police said.

Bonds, a career criminal, walked out of a bodega and shot Familia with no apparent provocation.

When she was shot, the slain officer was assigned with a partner in a mobile command post just hours after millions gathered across the city to watch fireworks and celebrate Independence Day.

That partner immediately made a panicked radio call for assistance, screaming "my partner's shot," as the official on the other end repeatedly asked for their location.

Police swarmed the area after the shooting as they looked for Familia's killer, witnesses said.

"It looked as if police were getting into a rumble, like as if they were trying to take down a suspect. They were running all over the place," witness Jason Marzelli said.

An anti-crime team, consisting of a sergeant and a police officer, who were in uniform, confronted the suspect about a block from the shooting on Morris Avenue, police said.

Bonds then allegedly drew his weapon, and the officers fired, killing him.

Photo Gallery

A person, described by police as a bystander, was also struck by a bullet and transported to the hospital, police say. The victim was shot in the stomach, the NY Daily Newsreports.

It is not clear if Bonds fired his weapon in the confrontation with the anti-crime team.

A silver revolver was recovered at the scene, police say. An image of the weapon has been released by the NYPD.

Familia, who is a mother of three and 12-year veteran of the police force, died within hours of the shooting, police sources said.

Her death reminded many of the eerily similar killings of Detectives Wenjian Liu and Rafael Ramos, who were gunned down as they sat in their patrol car in Bedford-Stuyvesant, Brooklyn, in 2014. In that slaying, the shooter took his own life.

As people awoke to the news of Familia's killing, hundreds, if not thousands, of fellow officers had already arrived at the hospital Wednesday morning to pay their respects.

Bonds was on parole for robbery in Syracuse, and had a previously assaulted an officer with brass knuckles, the NY Daily News reports.