PALMDALE (AP) — A security guard at a medical marijuana dispensary in unincorporated Los Angeles County has been shot while trying to prevent a robbery at the business.

Sheriff’s Capt. Don Ford said Thursday that the guard was shot three times late Wednesday when he tried to stop three suspects wearing bandanas and hoodies from breaking into the Green Cactus Collective in Palmdale.

The guard was in critical condition at a local hospital but was expected to survive.

Ford says the suspects fled on foot and remain at large. At least one was armed with a handgun.

Ford says the dispensary itself was illegal because such businesses are not permitted in unincorporated Los Angeles County.

Palmdale is about 60 miles northeast of Los Angeles.

(© Copyright 2013 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)