Miosotis Familia spent late nights keeping a careful watch over a Bronx neighborhood beset by gang violence, including a triple shooting just months ago.

But the dangers of the job did not daunt the 12-year veteran of the New York Police Department, a 48-year-old mother of three who lived just a few miles from where she worked. Familia served as a protector of her own community, providing a steady, comforting law enforcement presence in a neighborhood that badly needed it.

She specifically requested the midnight shift about three weeks ago, relatives told the New York Daily News and Newsday, so that she would have more time to spend with her children and other family members during the summer.

It was during this midnight shift early Wednesday when a gunman approached her large RV-style police command vehicle, firing through a window and hitting Familia in the head, killing her. She was “assassinated in an unprovoked attack,” the city police commissioner said, adding that police are still trying to determine the motive for the shooting.

“She said she wanted to protect the city from all those crazies,” one of Familia’s sisters, Adriana Sanchez, 39, a medical technician who lives in West Milford, N.J., told Newsday, “and look what happened,”

Familia’s death marked the first female NYPD officer slain in the line of duty since the 9/11 attacks, the New York Times reported. She is the third female cop killed in a “combat-type encounter” in NYPD’s history, according to the Times.

Familia “gave her life protecting a neighborhood that had been plagued by gang gun violence,” Patrick J. Lynch, president of the Patrolmen’s Benevolent Association, said in a statement. “Fully knowing the dangers that she faced, she suited up in uniform everyday and stood tall against those who threaten and terrorize the good folks of the Bronx.”

After suffering a leg injury from a fall while on duty in 2014, Familia refused to retire from the police force, even when relatives encouraged her to do so, the Daily News reported.

“She wasn’t ready to retire,” Familia’s brother-in-law Ernest Sanchez told the Daily News. “She was hurt on the job, but she wanted to continue working.”

Indeed, relatives, friends and colleagues described Familia as a tough cop who grew up in Washington Heights in northern Manhattan when the neighborhood was experiencing a crack cocaine epidemic and rampant crime. Her family is originally from the Dominican Republic, but Familia was born in the U.S.

“She was a survivor,” Milton Castro, 47, who grew up with Familia in Washington Heights, told the New York Times. “She was around all of that stuff like we all were as kids, and she came out of that wanting to help people and wanting to become a police officer. It’s a testament to who she was as a person.”

Familia was also the youngest of nine brothers and sisters, the Times reported. (Other New York media outlets reported she was youngest of 10.)

“She would set anybody straight,” Familia’s nephew John Cuello told the Times. “I’ve seen a lot of her putting her siblings in their place. Holding her ground. Her attitude was, ‘I might be the youngest one, but I’m the toughest one.’”

But at the same time, relatives and community members recalled a softer side to Familia, who served as a caregiver throughout her career and personal life. She raised a daughter, now 20, and twins who are now 12 while also taking care of her 86-year-old mother, who recently underwent surgery for oral cancer, relatives told the New York Daily News.

Familia’s children, “are numb,” Sanchez, Familia’s sister, told the Daily News. “They were like, ‘Who’s going to take care of us now?’

Familia joined the police force in her mid-30s, later in life than most officers, the Associated Press noted. Before that, Familia worked as a nurse at New York University Hospital and as a medical assistant at the American Red Cross, according to her LinkedIn page.

Familia was known among many Bronx residents as a friendly, approachable officer who spoke Spanish and greeted community members with a smile. Several local residents of all ages stopped by the 46th Precinct on Wednesday to leave flowers and mourn her loss.

One longtime resident who got to know Familia well, Maria Santiago, 77, spoke to Newsday with her eyes puffy, apparently from crying. She said Familia would always say hello when she walked by.

“She was very sweet,” Santiago said with tears in her eyes. “She was very gentle.”

Even residents who received citations from Familia or had family members arrested by her spoke highly of the officer. Keisha Williams, 31, told the AP that Familia arrested her husband on a marijuana charge last year.

“She gave me good advice, like a mother to a daughter,” Williams said. “She’s good, but she’s a tough cookie. She’s a good cop. I’m just sad it was her.”

Mario Flores said he received a summons from Familia last week for an open container, he told CBS New York. The officer “handed me the ticket, but with a smile, and I had to smile back because she was very respectful.”

“This is her neighborhood, you know,” Flores said. “The thing is that she’s out here protecting us. And look, for what?”

51-year-old Bronx resident Brenda Moore walked by Familia’s vehicle shortly before she was shot, she told the Daily Beast.

“I said, ‘How are you?’ She said, ‘I’m fine, how are you?’” offering a smile, Moore said. “She was so sweet,” Moore added. “Very sweet, good person.”

After greeting Familia, Moore might have heard the sound of a gunshot as she walked up the block. But the Fourth of July festivities were still underway, and Moore said, “I thought it was just fireworks,” she would recall.

“She was always sitting right there outside the beauty supply store,” Moore said.“That was the safety,” Moore added. “They made us feel safe.”

More from Morning Mix