A man accused of shooting civilians and sheriff’s deputies with a pellet gun in January 2011 remains incompetent to stand trial, a Superior Court judge ruled Thursday, after two years of competency hearings and court-ordered medication plans following his arrest.

Charles Peart Quinn is accused of shooting and wounding two young men who refused to give him money with a pellet gun at the Camino Real Marketplace in Goleta, and two responding deputies in a field nearby.

Authorities said Quinn hit two deputies, one in the forearm and one in the face.

Three deputies at the scene returned fire with their .40-caliber semi-automatic pistols and hit him four times

Quinn is a transient and registered sex offender in Florida, according to authorities.

He has had multiple competency hearings since his arrest in January 2011, after being released from the hospital. He was committed to Patton State Hospital in San Bernardino after being declared incompetent in June 2011, and the hospital was authorized to administer antipsychotic medications without his consent since the court found Quinn lacked the capacity to make decisions regarding medication.

He was ruled incompetent in June 2011, six months after his arrest, then had his certification of competency approved by Superior Court Judge Jean Dandona at a later hearing in October.

However, on Thursday, Dandona reviewed the medication report, found that Quinn was incompetent to stand trial and suspended his criminal proceedings. He is scheduled for a placement hearing on April 11 after getting a recommendation from the Ventura County Behavioral Health Department.

Senior Deputy District Attorney Mary Barron is prosecuting the case, and Quinn is represented by public defender Jeff Chambliss.

Quinn was examined by two court-appointed psychologists, and both said he is not competent to stand trial, Barron said. Based on this, Dandona ordered Quinn to be evaluated for placement at a mental health facility, most likely back to Patton State Hospital, until he is restored to competency.

Quinn has pleaded not guilty to 15 felony and misdemeanor counts, including armed attempted robbery, assault with a deadly weapon, assault with a deadly weapon on a peace officer, resisting an executive officer, brandishing a replica gun and failure to register as a sex offender.

Noozhawk staff writer Giana Magnoli can be reached at gmagnoli@noozhawk.com. Follow Noozhawk on Twitter: @noozhawk, @NoozhawkNews and @NoozhawkBiz. Connect with Noozhawk on Facebook.