FORDHAM HEIGHTS, the Bronx — An NYPD officer working overnight following the Independence Day holiday was assassinated in an unprovoked attack in the Bronx, department officials said Wednesday.

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 confrontration 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.

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 News reports.

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.

Wednesday's shooting was less than two miles away from where Sgt. Paul Tuozzolo was fatally shot in November. He was a 19-year veteran of the force and a father of two.

#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

I offer my deepest condolences to Officer Familia's loved ones and fellow members of the NYPD. Today, we all mourn one of New York's Finest. — Andrew Cuomo (@NYGovCuomo) July 5, 2017

Woke to the terrible news that Officer Miosotis Familia was shot & killed in the Bronx overnight. God bless her family & the NYPD. — Chuck Schumer (@SenSchumer) July 5, 2017