SACRAMENTO, Calif. — 4:45 p.m. Thursday update:

Sacramento police are allowing residents in the evacuation area back into their homes.

Original story:

Sacramento police are mourning the loss of one of their own, a first for the department in over 20 years.

Officer Tara O'Sullivan, 26, died at UC Davis Medical Center hours after a gunman opened fire on her and other officers, Deputy Chief Dave Peletta said during a news conference. 

Adel Sambrano Ramos, the man who allegedly shot and killed O'Sullivan, was taken into custody shortly before 2 a.m. Thursday, police officials confirmed. The shooter came out of the home in which he was holed up and surrendered following hours of negotiations, police said. It's unclear what happened during the negotiations that lead to the suspect's arrest.

RELATED: 

Around 6 p.m. Wednesday, June 19, several officers were on a domestic disturbance call along the 200 block of Redwood Avenue in north Sacramento. O'Sullivan was helping a woman collect her belongings and leave a home when she was shot, Sacramento Police Sgt. Vance Chandler said.

The woman O'Sullivan was helping was not hurt. The relationship between her and the gunman wasn't immediately known.

O'Sullivan was in a backyard and officers couldn't reach her because the gunman kept firing, Chandler said.

"Our officers maintained cover in safe positions until we were able to get an armored vehicle in the area," Chandler said.

About 50 minutes after she was shot, an armored vehicle showed up and took O’Sullivan to UC Davis Medical Center where she later died after surgery.

Deputy Chief Peletta said O'Sullivan was partnered with a training officer when she was shot just before 6 p.m. She worked with the department's administrative staff from January to July 2018 before joining the Sacramento Police Academy. She graduated from the academy in December 2018.

WATCH MORE: Sacramento Police give update on shooting of Officer Tara O'Sullivan in North Sacramento