Alastasia Bryan, 25, was at the corner of Avenue L and East 73rd Street in the Flatlands section of the borough when shots were fired from a man who exited a dark-colored Honda Civic that rolled up at around 9:15 p.m. Sunday, police sources said.

Five shots rang out and a single bullet struck the officer in the head, killing her instantly as the shooter got back into his car and sped away.

“It’s so sad and unexpected. All I want to know is why they did it?” her devastated aunt, Mintha Bryan, told The Post.

“The whole family is devastated. Only God knows why they did this … a young person coming up in life. My heart was killing me. I didn’t sleep last night,” she added.

Bryan had been in the neighborhood visiting family and friends — and was on her way to Rikers Island for a shift — when the shooting unfolded, sources said.

Her death appeared to have been planned and the killer was believed to have been waiting at the intersection before she arrived, the sources added.

NYPD Chief of Detective Robert Boyce said Monday, “We have a male who appears to be waiting for her to get out of that car… He got out of the car and he fired five rounds into her car, striking her… This male then got into a car and drove away.”

Boyce added, “We’ve got a long way to go in this investigation,” while noting that the slaying does not appear to be related to the shooting of a Queens state corrections officer who was likely intentionally ambushed by two men during a home invasion on Nov. 27.

Bryan graduated from the academy on Nov. 1, her aunt said.

“She enjoyed it, she loved it,” Mintha Bryan, 68, said of her niece’s job. “She was well-educated, she loved to work. She looked out for her mother, brothers, sister and father. She was the backbone of her family.”

Bryan, the youngest daughter, lived with her parents and brother, she said.

Officers at the scene where a corrections officer was shot dead in her car.Wayne Carrington

The officer’s mother heard gunshots and went to the window Sunday night, “not knowing it was her child,” she added.

Cousin Claire Yerwood, 43, also described the slain woman as very devoted to her family.

“Everybody loved her down to the kids. She was always there for her family. Her family always came first,” Yerwood said. “She loved her job. Always independent, always a go-getter.”

Elias Husamudeen, president of the Correction Officers’ Benevolent Association, released a statement on Facebook expressing the department’s grief.

“Tonight our correction family and the entire City of New York is shocked and grieving the horrific murder of one of the youngest members of New York City’s Boldest, who was shot and killed by an unknown assailant while sitting in her car in Brooklyn,” he wrote.

“There are no words that can express the depth of this tragedy. The COBA will do everything we can to support the officer’s family during this time and we will not rest until the assailant or assailants are brought to justice.”

Investigators were reviewing security footage as cops continued to canvass the area for clues.