A man arrested for stabbing a deputy in March at a Goleta Valley homeless housing community was deemed not mentally competent to stand trial in Santa Barbara Superior Court.

Abu Bakr Harun Sugich, 44, was also committed to a treatment facility in May.

Sugich had initially faced a handful of felony charges and enhancements in connection with the March 20 incident, including first-degree attempted murder, assault with a deadly weapon, obstructing/resisting an officer, using a deadly weapon during a crime, and having two or more felony convictions.

Emergency crews first responded to a welfare check at La Posada on Hollister Avenue after Sugich called 9-1-1, Santa Barbara County Sheriff’s Office spokesperson Raquel Zick said in March.

He was “in an agitated state and made alarming statements indicating he intended to harm someone,” Zick said.

“During the encounter, Sugich briefly walked away before returning and advancing toward a deputy… without warning, Sugich produced a black hunting-style knife and stabbed Deputy Fabian Flores in the upper chest,” she added.

Flores was transported to Santa Barbara Cottage Hospital. He was treated and released.

Court records show Sugich had previously been accused of felony and misdemeanor allegations unrelated to the March incident in both Santa Barbara and Santa Maria courts, spanning back to 2002.

Those charges include vandalism, burglary, identity theft, grand theft, battery, possession of a controlled substance and petty theft, among others.

Noozhawk South County editor Evelyn Spence can be reached at espence@noozhawk.com. Follow Noozhawk on Twitter: @noozhawk, @NoozhawkNews and @NoozhawkBiz. Connect with Noozhawk on Facebook.