Desirae Ortega was inside her Encino apartment Tuesday night when gunfire erupted outside her window.

It was between a father accused of slaying a 9-year-old boy’s mother and police.

Ortega said she and a guest ran to the upper level of her apartment after the shooting.

“We weren’t sure if there were additional suspects,” said Ortega, 28. “So we waited a good while until we kind of peeked through the window and went ‘oh, there’s a body.’”

Authorities said the boy was in protective custody Wednesday after being abducted by his father, who was shot and killed by police in Encino on Tuesday evening.

The abduction prompted an Amber Alert.

The shooting occurred about 6:45 p.m. on the 5500 block of Lindley Avenue near Killion Street, said Los Angeles Police Department Deputy Chief Justin Eisenberg.

Konstantin Morozov, 48, brought his son, Daniel Morozov, to a friend’s apartment, and police found them after receiving a tip, Eisenberg said.

The elder Morozov, who was suspected of fatally shooting Daniel’s mother and then abducting the boy Monday in Santa Maria, emerged from the apartment and confronted officers, prompting an officer-involved shooting, Eisenberg said.

The mother’s name, according to multiple media reports, was Natalia Morozova, and a memorial service was held for her Tuesday evening in Santa Maria.

A friend told Santa Barbara television station KSBY 6 that Konstantin and Natalia were recently divorced and Konstantin is Daniel’s father.

After the officer-involved shooting, the father was taken to a local hospital, where he died, said LAPD Officer Mike Lopez.

A gun was recovered at the scene, Lopez added.

Lopez said the boy was unharmed and in protective custody with the Los Angeles County’s Department of Children and Family Services, which is working on a “placement plan” for him.

“Obviously, his mom was killed the day before, and then his dad,” Lopez said. “They’ve got to find his next of kin.”

LAPD Officer Drake Madison added police were investigating why the father was in Encino.

James Russell, 37, stood outside of his apartment complex on Wednesday. Like other residents, he said the shooting was an anomaly, because the father came hours away from Santa Maria to Encino.

“It’s like blindly throwing a dart — and we just won a bad lottery,” Russell said.

According to the Santa Maria Police Department, Daniel was abducted at 8:39 p.m. Monday following the fatal shooting.

Initially, police explained the suspect was seen driving a blue 2015 Volkswagen Golf hatchback, but that vehicle was found abandoned Tuesday morning in Santa Maria.

Police then said the boy and the suspect might be in a black 2017 Jeep Cherokee, but that vehicle was located Tuesday afternoon in Santa Barbara.

On Monday night, officers went to the shooting scene at 230 N. College Drive in Santa Maria and found a person dead, the Santa Maria Police Department said. As a result of the investigation, police requested an Amber Alert for Daniel in Los Angeles, Ventura and Santa Barbara counties.

Lopez said LAPD’s Force Investigation Division is investigating the officer-involved shooting. The Santa Maria Police Department was investigating the mother’s shooting death.

Ortega, who has lived in the area for a year, said the area is safe and the shooting doesn’t change her opinion.

“It’s a freak accident … it just happened to be right outside my window,” Ortega said.

Reporter Wes Woods II contributed to this story.