Southern California sheriff’s deputy Joseph Gilbert Solano, who was shot and critically wounded on Monday while getting food at a fast-food restaurant, has died, officials announced.

Solano, a 13-year-veteran deputy with the Los Angeles County Sheriff's Department, died Wednesday afternoon surrounded by loved ones.

Rhett Nelson, a 30-year-old Utah man who his family had reported missing, was identified as the suspected gunman, investigators said.  He was arrested a day after the shooting when his father called authorities to turn him in.

Deputy Joseph Gilbert Solano has died, officials said. (Los Angeles County Sheriff's Department)

“We have the suspect in custody,” Sheriff Alex Villanueva said at a news conference Wednesday.

UTAH MAN ARRESTED IN SHOOTING OF OFF-DUTY CALIFORNIA DEPUTY AT JACK IN THE BOX

“We are continuing processing all the information, all the evidence to present a solid case for prosecution,” he added.

Nelson was suspected of walking into a Jack in the Box restaurant in the eastern Los Angeles suburb of Alhambra on Monday night and shooting Solano in the head.

The 50-year-old deputy was off duty at the time. Paramedics rushed him to the hospital in grave condition and doctors put him on life support, Villanueva said.

Solano was not wearing anything that would identify him as a law-enforcement officer and investigators said the shooting appeared to be random.

He added that there was “no prior knowledge, there’s no indication that he knew that the person was a law-enforcement officer.”

Rhett Nelson, 30, of St. George, Utah, was arrested by Long Beach police. Surveillance footage showed the suspect accused of shooting an off-duty deputy.  (LA County Sheriff’s Department)

He continued, “The deputy was alerted in the restaurant that someone was following him and that’s when he turned to confront it and that’s when the shooting happened.”

Villanueva added, “The motive or rationale from the suspect, that’s a million-dollar question.”

Long Beach police took Nelson into custody Tuesday after he stopped at a church and called his father in Utah, Sheriff’s Homicide Bureau Capt. Kent Wegener said.

“In that call, he referred to committing a murder in Southern California,” he added.

Wegener said Nelson’s father called police who traced the call to the church, and shortly thereafter, Long Beach officers spotted him in a car near the church and arrested him without incident.

Investigators said they were looking into whether he killed another man an hour earlier on Monday in what appeared to be another random attack.

Chief Michel Moore with the Los Angeles Police Department said a 30-year-old man standing on a street near downtown Los Angeles on Monday was shot and killed after somebody inside a vehicle “had a brief exchange with our victim” and “gunfire erupted.”

He added that Nelson’s description and the car he was driving matched those seen at both shootings.

At the news conference Wednesday, Villanueva acknowledged police also were investigating whether Nelson was linked to numerous armed robberies in the San Diego area.

“It’s an astonishing level of violent crime in such a short period of time and we can only think that but for this last incident that crime spree may have continued,” said Villanueva.

NEW YORK WOMAN ASSAULTS SUBWAY RIDER WITH INFANT STRAPPED TO CHEST, POLICE SAY

“But, we’re fortunate that the father of the suspect made a very key phone call to the Long Beach Police Department that allowed us to put the resources together to detain him so there were no further victims in this person’s crime spree that didn’t look like it would be abated until he was actually arrested.”

Nelson’s father issued a statement on Tuesday saying he was “saddened beyond words” by the shooting “and to learn that our son Rhett is being held in connection with this horrifying and senseless attack.”

He said his son disappeared on May 26.

In a May 30 Facebook post, Nelson’s father said his son “has a history of opiate abuse and has been clean for about 6 months, but we know what a terrible struggle that is. We are praying for his safe return.”

The Salt Lake Tribune reported that Nelson did not have a violent criminal history in Utah but previously had pleaded guilty to driving with a “measurable amount” of a controlled substance in his body.

(Fox 11)

Solano was most recently assigned to the department’s custody division. Villanueva described him as a family man well-liked by everyone who worked with him.

“Not only did I lose a father figure but a best friend," Solano’s step-daughter told reporters on Wednesday as she held back tears. “I would like to thank everybody who has supported us, sent us prayers, and the whole entire law enforcement.”

(Fox 11)

His son also got emotional as he spoke at the news conference calling Solano “a really good dad.”

Solano’s girlfriend called the attack a “senseless tragedy” and thanked law enforcement for “apprehending the perpetrator.”

CLICK HERE TO GET THE FOX NEWS APP

She added, “Although the outcome was not what we wished it to be, we have solace knowing that he is in a better place now.”

The Associated Press contributed to this report.