More than 100 people gathered late Wednesday for a vigil to honor a California police officer who was fatally shot.

The officer, identified as 48-year-old Sergeant Scott Lunger, was shot during a traffic stop earlier in the day, police said.

Speaking at a press conference, Hayward Police Capt. Mark Koller said: "[Scott] was always out there, eager to get involved. He was engaged in the community."

[GALLERY]Crime Scene Photos: Hayward Police Officer Shot, Killed During Traffic Stop

Koller deemed Lunger's death a "tremendous loss" and Wednesday a "dark day for the community of Hayward, the Hayward Police Department, the family of [the] department and the men and women of law enforcement."

The shooting occurred at 3:14 a.m. in the vicinity of Myrtle and Lion streets, police said.

Lunger stopped a vehicle whose driver was "observed driving erratically," police said. But when he got out of his car and approached the driver's side of the vehicle, its occupant opened fire without warning, they added.

A second officer, who was present at the scene and did not sustain injuries, fired back. But the suspect fled despite being struck, police said. The entire exchange lasted about 45 seconds, they added.

Police also said that the suspect vehicle, believed to be a white GMC pickup truck, was later recovered in Oakland. Abandoned at an intersection, the car was reportedly riddled with bullet holes on the driver's side door.

We are heartbroken to report that HPD Sergeant Scott Lunger was killed in the line of duty this morning. pic.twitter.com/NN2mTFXfqw — HaywardPD (@HaywardPD) July 22, 2015

Based on information found in the vehicle, police were able to identify a "person of interest" and ensure that he no longer posed a "threat to the community," Koller said.

The suspect, 21-year-old Mark Estrada, was arrested Wednesday afternoon when he was admitted to San Leandro Hospital and then transferred to Highland Hospital to be treated for a gunshot wound, police sources told NBC Bay Area.

Authorities said they are not searching for any other suspects at this time.

Citing the active investigation, which is in its early — and most "crucial" — stage, Koller declined to furnish additional details. Providing information prematurely could "jeapordize" ongoing police work, he said.

But Koller didn't hold back when talking about Lunger.

He said the 15-year veteran who was promoted to sergeant in 2009 was "well liked" and "well respected" — in short, an "ideal" police officer. The pair were "close [friends]," Koller said, noting that Lunger was an "accomplished" member of the police department's gang and SWAT teams, and also helped train young police officers.

NBC Bay Area

"Scott loved this job," Koller said. "He did it eagerly. It is a tragedy that this has happened, that someone has done this. … The department is devastated but we are pulling together and we will get through this."

The California Highway Patrol, Alameda County Sheriff's Department and District Attorney's Office, and San Jose, San Leandro and Union City police departments are assisting Hayward police.

Thanking all those who have come forward to support the department, Koller said the "outpouring is overwhelming."

Earlier in the day, Lieutenant Eric Krimm deemed the shooting "devastating to the officers involved and to the community."

“No officer comes to work wanting to be involved in something like that so [officer-involved shootings are] very difficult,” he noted. “They’re difficult for those involved, they’re difficult for the families, they’re difficult for the communities.”

According to the Hayward police department's "Officer Down Memorial Page," three officers have been killed in the line of duty — most recently in 1987.

"Unfortunately, a police officer’s job is very dangerous and as we can see today ... there's nothing routine about what our officers do," Koller said. "There are times [when] they have no idea who they’re stopping … Tragedy happens immediately and without warning."

NBC Bay Area's chopper showed heavy police presence at Eden Medical Center in Castro Valley where Lunger was taken. Law enforcement officers saluted as a casket carrying the slain officer's body was loaded into a vehicle.

On Wednesday, news of Lunger's death rocked Bay Area's law enforcement agencies.

Captain Christopher Sherry, commander of the CHP in San Francisco, wrote on Twitter: "My thoughts and Prayers are with the Hayward PD. This is a very sad day for all law enforcement. #GodSpeed"

Mountain View police echoed the same sentiment.

"We mourn with our brothers + sisters of the HaywardPD + family of the fallen," they tweeted. "Rest peacefully Sgt. Scott Lunger."

Police said anyone wishing to make a donation for the Lunger family can contact the Hayward Police Officers Association at 510-293-5010.

NBC Bay Area's Ian Cull, Stephanie Chuang, Bob Redell and Shawn Murphy contributed to this report.

Heavy police presence in #hayward after reports of shots fired poss. involving police officer. 1 person transported. pic.twitter.com/9dBBh98b9c — Bob Redell (@BobNBC) July 22, 2015

Neighbor heard someone doing donuts, police sirens then 6-7 shots around 3 am in #Hayward neighborhood where police have converged. — Bob Redell (@BobNBC) July 22, 2015

Hayward PD investigating an OIS. At this time we are not releasing the condition of the officer involved. — HaywardPD (@HaywardPD) July 22, 2015

#DEVELOPING in #Hayward: reports of police officer shot after possible attempt to stop a car.@BobNBC with the latest https://t.co/StnvFYxPHM — Stephanie Chuang (@StephChuang) July 22, 2015

Substantial police presence outside #CastroValley ER where #Hayward shooting vic may've been sent.May be police ofc. pic.twitter.com/7HKJTqVG4h — Stephanie Chuang (@StephChuang) July 22, 2015

Last time #Hayward pol. ofc was shot at was March (not hit). Police found suspect hrs later.Happened just a few blocks from this AM's scene. — Stephanie Chuang (@StephChuang) July 22, 2015

Our thoughts and prayers are with the officer, family and friends @HaywardPD. — CHP - Contra Costa (@320PIO) July 22, 2015