BAKERSFIELD, Calif. (KGET) — Reginald Anderson suffers from depression, a relative says in court documents.

He gets mad at squirrels that disturb the backyard garden he tends in the 8000 block of Goesling Avenue, talks to himself and has abused drugs, the relative told sheriff’s investigators.

Despite the at times unusual behavior, the relative said she was not alarmed when Anderson called 911 and armed himself with a knife early July 14.

When Deputy Richard Griffee arrived, however, Anderson, 27, refused commands to take his hand out of his pocket. Then he lunged with the knife at Griffee and Griffee opened fire, according to court documents and body camera footage released by the Sheriff’s Office.

Both the deputy, who suffered moderate injuries from a cut to his arm, and Anderson, who suffered gunshot wounds, were taken to a local hospital.

Anderson pleaded not guilty Wednesday to charges of attempted murder, assault with a deadly weapon other than a firearm on a peace officer, brandishing a deadly weapon to avoid arrest and resisting a peace officer resulting in death or serious bodily injury.

He’s being held on $1 million bail on those charges and is next due in court Aug. 2.