STOCKTON, Calif. (KTXL) — A man that entered the backyard of a home was shot and killed by the caretaker of the homeowner in Stockton, according to the Stockton Police Department.

Officers responded to a report of a shooting in a backyard in the 3200 block of Allston Way. When they arrived on the scene, they found a 38-year-old man who had been shot. Medics transported the man to a local hospital, where he later died from his injuries.

According to police, the 38-year-old man tried to physically attack a caretaker in the backyard. The caretaker, a 43-year-old man, “fearing for his life, shot the attacker,” and then called 911 for help.

According to the San Joaquin County District Attorney’s Office, the shooting appears to be justified, however, it is still an active investigation.