The man arrested in the shooting death of 24-year-old Navy Corpsman Devon Rideout was a Marine Corps deserter and diagnosed schizophrenic.

Prosecutors said former Marine Cpl. Eduardo Arriola, 25, “ambushed” Rideout, shooting the unsuspecting corpsman three times in the chest and twice in the head as she left her apartment to walk her dog at about 4 p.m. on July 20. Rideout had just arrived at her Oceanside, California, residence moments earlier after leaving Camp Pendleton and was still in uniform when she was killed, NBC San Diego reported.

The deranged shooter then tried to prevent witnesses from providing emergency aide, prosecutors said. Arriola was arrested the next day on suspicion of murder.

The defendant entered a plea of not guilty to murder and the condition of lying in wait, the San Diego Union-Tribune reported.

“This was a heinous shooting committed in broad daylight in front of witnesses,” Keith Watanabe, deputy district attorney, told NBC San Diego. “The defendant had to have been lying in wait because the victim only made it a few steps out her front door when she was gunned down.”

The alleged shooter confessed to the act when he was arrested and told authorities he shot Rideout because she was trespassing, the Union-Tribune reported.

Arriola, who lived in the apartment directly above Rideout, fled to Mexico when he deserted from the Marine Corps in 2016, reports said. He was arrested, diagnosed with Schizophrenia and discharged from the service in 2017 when he returned.

× Fear of missing out? Sign up for the Navy Times Daily News Roundup to receive the top Navy stories every afternoon. Thanks for signing up. By giving us your email, you are opting in to the Navy Times Daily News Roundup.

Despite his documented mental illness, Arriola legally purchased the .38-caliber Smith and Wesson revolver he allegedly used to murder Rideout only two months ago from Iron Sights shooting range in Oceanside, Fox 5 San Diego reported. The gun dealer apparently had no access to the military records that contained his diagnosis.

Investigators say the alleged murderer and victim were not acquaintances, but a disturbing discovery was made when authorities investigated Arriola’s vehicle. Rideout’s name, along with the names of two others, were inscribed on the car’s radiator, accompanied by the words, “rest in peace” and references to the Quran, reports said. Investigators are looking into the other names.

Bizarre twist in the case of Oceanside man accused of murdering Navy Corpsman. Victim’s name was written on his car radiator. Suspect Eduardo Arriola is a former Marine who was diagnosed with Schizophrenia. Prosecutors say he was lying in wait and now faces death penalty. #nbc7 pic.twitter.com/c1PhBdSk1m — Artie Ojeda (@ArtieNBCSD) July 24, 2018

On Tuesday, family members of the victim sobbed as details of the alleged crime were read aloud in court, the report said. Arriola stared blankly.

If convicted, Arriola could face the death penalty.

A native of California, HM3 Rideout enlisted in the Navy in February 2013. She’d been stationed at Naval Hospital Camp Pendleton since November 2017 following a stint at the Branch Health Clinic at Norfolk Naval Shipyard in Portsmouth, Virginia.

“We are all deeply saddened by the tragic loss of Petty Officer Rideout,” a statement from Navy Medicine West said. “Our heartfelt condolences go out to her family and friends.”