In this undated photo released by the Sacramento Police Department is Officer Tara O' Sullivan. Sacramento police says the officer killed Wednesday, June 19, 2019, during a domestic violence call entered their academy in May 2018 and graduated seven months later, in December. The Sacramento Department said in a statement Thursday, June 20, 2019 that Officer Tara O'Sullivan was initially hired in January 2018 as a community service officer. (Sacramento Police Department via AP)

SACRAMENTO, Calif. (AP) — California prosecutors filed a murder charge Friday alleging that a Sacramento man was lying in wait when he used one of two illegal assault rifles to kill a rookie police officer this week.

The charges filed by the Sacramento County district attorney include special circumstances that could subject 45-year-old Adel Sambrano Ramos to the death penalty. However, that decision is months away and Gov. Gavin Newsom has imposed a moratorium on executions.

Sacramento police said they were helping a woman collect her belongings from a Sacramento home as part of a domestic violence call when Ramos opened fire Wednesday evening, mortally wounding Officer Tara O'Sullivan, 26.

They said he continued shooting for hours, pinning down officers until they could use an armored vehicle to move O'Sullivan 45 minutes later.

He's also charged with the attempted murder of a second officer, Daniel Chipp. The standoff with police lasted eight hours, with five officers firing their weapons.

Public defender Norm Dawson said he met briefly with Ramos but can't comment until he receives more details in the case. Ramos is set for his first court appearance on Monday.

Prosecutors allege that Ramos had two AR-15 style rifles assembled from parts to create assault weapons that are illegal in California. One had a pistol grip and telescoping stock, the other a non-fixed magazine and with a pistol grip, according the charges.

Law enforcement officials have said such so-called ghost guns are a particular problem because they cannot be easily traced.

The special circumstances in the case accuse Ramos of knowing O'Sullivan was a police officer performing her duties, and killing her "while lying in wait," which generally means that he took her by surprise before she knew an attack was coming.

"This is an ongoing investigation and we anticipate that additional charges may be added in the future," prosecutors said.

Court records show that Ramos has a history of domestic violence restraining orders. He was wanted on a bench warrant issued nine days before the shooting for failing to appear on a charge that he battered a young woman last year.

"It would be inappropriate for me to comment any further until I have a chance to review the materials," said Dawson, a supervising public defender. "It will be several months before we entertain entering any plea."

Ramos also has not responded to an interview request from The Associated Press

O'Sullivan is the first Sacramento police officer to be killed on the job in two decades.

File - In this June 6, 2011, file photo, Tara O'Sullivan applauds during College Park High School's commencement ceremony in Concord, Calif. A rookie Sacramento police officer was shot during a domestic violence call and lay wounded for about 45 minutes as the gunman kept officers at bay with bursts of fire, authorities said Thursday. She was finally rescued with an armored vehicle but died at a hospital. O'Sullivan, 26, was shot Wednesday June 19, 2019, while helping a woman collect her belongings to leave her home. (Karl Mondon/Bay Area News Group via AP, File)
File - In this June 6, 2011, file photo, Tara O'Sullivan decorated her mortar board with her police academy plans at College Park High School's commencement ceremony in Concord, Calif. A rookie Sacramento police officer was shot during a domestic violence call and lay wounded for about 45 minutes as the gunman kept officers at bay with bursts of fire, authorities said Thursday. She was finally rescued with an armored vehicle but died at a hospital.  O'Sullivan, 26, was shot Wednesday June 19, 2019, while helping a woman collect her belongings to leave her home. (Karl Mondon/Bay Area News Group via AP, File)
Muhammed Ilyas talks with a reporter near the scene where a police officer was killed by Adel Sambrano Ramos in Sacramento, Calif., Thursday, June 20, 2019. Ilyas, who lives near the scene of the shooting, said Ramos had a history of harassing a black family that lived next door and even threatened the three children with kitchen knives as they played outside. (AP Photo/Don Thompson)
This photo released Thursday, June 20, 2019, by the Sacramento Police Department shows Adel Sambrano Ramos. A rookie Sacramento police officer was shot by Ramos during a domestic violence call and lay wounded for about 45 minutes as the gunman kept officers at bay with bursts of fire, authorities said Thursday. Officer Tara O'Sullivan, 26, was finally rescued with an armored vehicle but died at a hospital. (Sacramento Police Department via AP)
This photo released Thursday, June 20, 2019, by the Sacramento Police Department shows Adel Sambrano Ramos. A rookie Sacramento police officer was shot by Ramos during a domestic violence call and lay wounded for about 45 minutes as the gunman kept officers at bay with bursts of fire, authorities said Thursday. Officer Tara O'Sullivan, 26, was finally rescued with an armored vehicle but died at a hospital. (Sacramento Police Department via AP)
Sacramento police continue to block off the scene where a police officer was fatally shot in Sacramento, Calif., Thursday, June 20, 2019. A man suspected of fatally shooting a Sacramento police officer responding to a domestic violence call surrendered after an 8-hour standoff in which he fired his rifle on and off, preventing officers from getting to their colleague as she lay wounded for nearly an hour, authorities said Thursday. (AP Photo/Don Thompson)
Sacramento police continue to block off the scene where a police officer was fatally shot in Sacramento, Calif., Thursday, June 20, 2019. A man suspected of fatally shooting a Sacramento police officer responding to a domestic violence call surrendered after an 8-hour standoff in which he fired his rifle on and off, preventing officers from getting to their colleague as she lay wounded for nearly an hour, authorities said Thursday. (AP Photo/Don Thompson)
In this undated photo released by the Sacramento Police Department is Officer Tara O' Sullivan. Sacramento police says the officer killed Wednesday, June 19, 2019, during a domestic violence call entered their academy in May 2018 and graduated seven months later, in December. The Sacramento Department said in a statement Thursday, June 20, 2019 that Officer Tara O'Sullivan was initially hired in January 2018 as a community service officer. (Sacramento Police Department via AP)
A law enforcement officer mans a barricade near a home that authorities have surrounded where an armed suspect has taken refuge after shooting a Sacramento police officer, Wednesday, June 19, 2019, in Sacramento, Calif. (AP Photo/Rich Pedroncelli)