The Los Angeles County sheriff's deputy shot in the head while off duty at a Jack in the Box on Monday has died, the sheriff said on Wednesday.

Joseph Gilbert Solano was shot while at the counter of a Jack in the Box restaurant at 2531 W. Valley Blvd. in Alhambra around 5:45 p.m. Monday. Sheriff's officials believe it was a random attack.

"In his passing there's always hope, heroes are never forgotten," said Sheriff Alex Villanueva, of the 50-year-old deputy and 13-year veteran.

"On a good day, we could do heroic things, save lives and avoid death. And other times, something as innocent as going to a fast-food restaurant, could be end of watch."

One phone call led police to the man suspected of shooting an LA County Sherrif's deputy in the head at a Jack in the Box in Alhambra. The suspect is also accused of killing another man just an hour earlier in downtown Los Angeles.

Medical staff worked diligently around the clock for the last two days "trying to do a miracle," Villanueva said.

"Unfortunately that didn't come to pass."

Solano's son, Matthew, struggled to keep his composure through tears while talking at the podium.

"Unfortunately, we lost him," he said. "He was a really good dad."

#LASD Homicide Detectives Need Your Help Identifying & Locating Attempted Murder Suspect - https://t.co/d3Mdsy2rae pic.twitter.com/Qw65f29hwN — LA County Sheriff (@LASDHQ) June 11, 2019

A man has been arrested in connection with a deputy being shot in the head in Alhambra. Ted Chen and Patrick Healy report for NBC4 News at 5 p.m. on June 11, 2019.

Julianna, Solano's longtime girlfriend, thanked everyone who supported them during the senseless tragedy.

"Although the outcome was not what we wished it to be, we have solace knowing that he is in a better place," she said.

Jessica, Solano's stepdaughter, said not only did she lose a father figure, but a best friend.

"Don't forget about him," she said. "He was a hardworking man. He would want us to continue his legacy and never forget him."

Following the announcement, family and sheriff's deputies gathered to honor and follow the body of the fallen deputy from the hospital to the coroner's office. Los Angeles Police Department officers also lined up to pay respects the veteran law enforcement officer.

The man suspected in the shooting, identified as Rhett McKenzie Nelson, 30, of Utah, was arrested Tuesday after a short police chase in Long Beach.

Villanueva said that investigators believe he is the sole suspect and questioned why it happened, calling it brazen and senseless.