The booking photo of Rhett Nelson. Photo courtesy of Los Angeles County Sheriff's Department.

A sheriff’s deputy who was shot in the head in an apparently unprovoked attack at an Alhambra Jack in the Box was fighting for his life today, while a Utah man remained jailed for allegedly shooting the lawman and possibly killing a man in downtown Los Angeles.

Rhett Nelson, 30, of St. George, Utah, was taken into custody around 10:40 a.m. Tuesday by Long Beach police in the 2400 block of Granada Avenue and later turned over to Los Angeles County Sheriff’s Department investigators, who arrested him.

Nelson is suspected in the shooting of off-duty Deputy Joseph Gilbert Solano, who was at the counter of a Jack in the Box restaurant in Alhambra around 5:45 p.m. Monday when he was shot in the back of the head in what sheriff’s officials believe was a random attack.

Los Angeles police Chief Michel Moore said Nelson is also suspected in a fatal shooting that occurred about an hour earlier in the 1900 block of East Seventh Place in the downtown area. That shooting, apparently done from inside a vehicle, left an unidentified 30-year-old man dead.

Police in San Diego said Nelson is being investigated as a possible suspect in four armed robberies—and one attempted armed robbery—at convenience stores in San Diego County between June 7-9. Three of the crimes were in San Diego and the others were in Lemon Grove and Carlsbad.

Three different law enforcement agencies are investigating those crimes, and all have been in contact with Los Angeles County sheriff’s officials to help determine if Nelson was involved, police said.

Sheriff Alex Villanueva tweeted on Wednesday that 50-year-old deputy Joseph Gilbert Solano is still on life support in the Intensive Care Unit at County-USC Medical Center

The sheriff’s department on Wednesday released a booking photo of Nelson.

“Investigators believe there is a possibility suspect Rhett Nelson may have been involved in additional criminal incidents since entering California,” according to the department. “With the public’s interest in mind, the booking photo is being released in an effort to seek any possible additional victims.”

On Wednesday, there was no word on the motive for either shooting.

Nelson was arrested after he made a phone call to his father from a church on Clark Avenue and told him about two shootings. Worried, his father called police and gave them the phone number his son used, which led police to the church.

Pastor Brad Paradee said when Nelson arrived at First Nazarene Church at 2280 Clark Ave., he considered him homeless.

“I was with him for one to two hours,” Paradee told the Daily News. “I gave him food and coffee, let him use my phone to call home and take a shower. He had the gun with him the whole time.”

A short time later, Nelson was seen driving away from the church, and police took him into custody him without incident after he pulled into the driveway of a home on Granada Avenue, sheriff’s Capt. Kent Wegener said.

Sheriff’s officials said Nelson’s relatives in Utah had recently reported him missing, with Wegener telling reporters that the suspect had arrived in Southern California around the first week of June.

Nelson’s father, Bradley, posted a photo of his son on Facebook on May 30 asking for help finding him, noting he had last been seen in southern Utah in his white 2012 Kia Sorento and that he had a history of drug abuse.

“Our 30 year old son Rhett Nelson disappeared 3 days ago, taking nothing with him but his phone, leaving all his clothing and his computer behind,” Bradley Nelson wrote. “We’ve had no contact with him, his phone is dead or off since then. He 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.”

By the first week of June, Rhett had made contact with relatives and told them he was in California, Capt. Mike Giles of the St. George Police Department told the Daily News.

Moore said detectives developed a connection between the “senseless attack” on the deputy and the fatal shooting in downtown Los Angeles that occurred around 4:50 p.m. Monday. Moore said a 30-year-old man was standing in the 1900 block of East Seventh Place “when a vehicle arrived and, according to other witnesses, an individual inside the vehicle had a brief exchange with our victim, gunfire erupted and our victim sustained at least one gunshot wound and died at the scene.”

“We are led to believe that he (Nelson) is potentially responsible. We are led to that belief on the basis of the suspect Mr. Nelson’s physical appearance, including some of his clothing, as well as the vehicle description,” Moore said.

Nelson’s father issued a statement Tuesday evening regarding his son’s arrest.

“My wife Jean and I, along with our family, are saddened beyond words to hear of the shooting of Los Angeles Sheriff’s Deputy Joseph Solano, and to learn that our son Rhett is being held in connection with this horrifying and senseless attack,” Bradley Nelson said. “We are cooperating fully with authorities and will provide them with all information they request concerning Rhett and his struggles. We ask that people please pray for Deputy Solano and his family.”

Sheriff’s officials ask that anyone, including other law enforcement agencies, has information involving Nelson, to call homicide investigators at 323-890-5500.

Editor’s note: This story was updated with additional information about the San Diego crimes.